summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-01-21 15:30:56 +0100
committerMinteck <contact@minteck.org>2023-01-21 15:30:56 +0100
commitd4cc6a4e1a48dba99e6ae8de2c8bef8881a6d65a (patch)
tree8682afb4a78194246692cae4e88005ac7ce043df
downloadautopush-d4cc6a4e1a48dba99e6ae8de2c8bef8881a6d65a.tar.gz
autopush-d4cc6a4e1a48dba99e6ae8de2c8bef8881a6d65a.tar.bz2
autopush-d4cc6a4e1a48dba99e6ae8de2c8bef8881a6d65a.zip
Initial commit
-rw-r--r--.gitignore1
-rw-r--r--.idea/.gitignore8
-rw-r--r--.idea/autopush.iml12
-rw-r--r--.idea/discord.xml7
-rw-r--r--.idea/jsLibraryMappings.xml6
-rw-r--r--.idea/modules.xml8
-rwxr-xr-xautopush118
-rw-r--r--node_modules/.package-lock.json418
-rw-r--r--node_modules/ansi-regex/index.d.ts33
-rw-r--r--node_modules/ansi-regex/index.js8
-rw-r--r--node_modules/ansi-regex/license9
-rw-r--r--node_modules/ansi-regex/package.json58
-rw-r--r--node_modules/ansi-regex/readme.md72
-rw-r--r--node_modules/ansi-styles/index.d.ts345
-rw-r--r--node_modules/ansi-styles/index.js163
-rw-r--r--node_modules/ansi-styles/license9
-rw-r--r--node_modules/ansi-styles/package.json56
-rw-r--r--node_modules/ansi-styles/readme.md152
-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/bl/.github/dependabot.yml16
-rw-r--r--node_modules/bl/.github/workflows/test-and-release.yml61
-rw-r--r--node_modules/bl/BufferList.d.ts382
-rw-r--r--node_modules/bl/BufferList.js396
-rw-r--r--node_modules/bl/CHANGELOG.md17
-rw-r--r--node_modules/bl/LICENSE.md13
-rw-r--r--node_modules/bl/README.md247
-rw-r--r--node_modules/bl/bl.js84
-rw-r--r--node_modules/bl/index.d.ts88
-rw-r--r--node_modules/bl/package.json123
-rw-r--r--node_modules/bl/test/convert.js21
-rw-r--r--node_modules/bl/test/indexOf.js492
-rw-r--r--node_modules/bl/test/isBufferList.js32
-rw-r--r--node_modules/bl/test/test.js914
-rw-r--r--node_modules/buffer/AUTHORS.md73
-rw-r--r--node_modules/buffer/LICENSE21
-rw-r--r--node_modules/buffer/README.md410
-rw-r--r--node_modules/buffer/index.d.ts194
-rw-r--r--node_modules/buffer/index.js2106
-rw-r--r--node_modules/buffer/package.json93
-rw-r--r--node_modules/chalk/index.d.ts415
-rw-r--r--node_modules/chalk/license9
-rw-r--r--node_modules/chalk/package.json68
-rw-r--r--node_modules/chalk/readme.md341
-rw-r--r--node_modules/chalk/source/index.js229
-rw-r--r--node_modules/chalk/source/templates.js134
-rw-r--r--node_modules/chalk/source/util.js39
-rw-r--r--node_modules/cli-cursor/index.d.ts47
-rw-r--r--node_modules/cli-cursor/index.js39
-rw-r--r--node_modules/cli-cursor/license9
-rw-r--r--node_modules/cli-cursor/package.json49
-rw-r--r--node_modules/cli-cursor/readme.md51
-rw-r--r--node_modules/cli-spinners/index.d.ts125
-rw-r--r--node_modules/cli-spinners/index.js15
-rw-r--r--node_modules/cli-spinners/license9
-rw-r--r--node_modules/cli-spinners/package.json49
-rw-r--r--node_modules/cli-spinners/readme.md53
-rw-r--r--node_modules/cli-spinners/spinners.json1468
-rw-r--r--node_modules/clone/.npmignore4
-rw-r--r--node_modules/clone/LICENSE18
-rw-r--r--node_modules/clone/README.md126
-rw-r--r--node_modules/clone/clone.iml10
-rw-r--r--node_modules/clone/clone.js166
-rw-r--r--node_modules/clone/package.json51
-rw-r--r--node_modules/color-convert/CHANGELOG.md54
-rw-r--r--node_modules/color-convert/LICENSE21
-rw-r--r--node_modules/color-convert/README.md68
-rw-r--r--node_modules/color-convert/conversions.js839
-rw-r--r--node_modules/color-convert/index.js81
-rw-r--r--node_modules/color-convert/package.json48
-rw-r--r--node_modules/color-convert/route.js97
-rw-r--r--node_modules/color-name/LICENSE8
-rw-r--r--node_modules/color-name/README.md11
-rw-r--r--node_modules/color-name/index.js152
-rw-r--r--node_modules/color-name/package.json28
-rw-r--r--node_modules/defaults/LICENSE22
-rw-r--r--node_modules/defaults/README.md39
-rw-r--r--node_modules/defaults/index.js13
-rw-r--r--node_modules/defaults/package.json33
-rw-r--r--node_modules/defaults/test.js34
-rw-r--r--node_modules/has-flag/index.d.ts39
-rw-r--r--node_modules/has-flag/index.js8
-rw-r--r--node_modules/has-flag/license9
-rw-r--r--node_modules/has-flag/package.json46
-rw-r--r--node_modules/has-flag/readme.md89
-rw-r--r--node_modules/ieee754/LICENSE11
-rw-r--r--node_modules/ieee754/README.md51
-rw-r--r--node_modules/ieee754/index.d.ts10
-rw-r--r--node_modules/ieee754/index.js85
-rw-r--r--node_modules/ieee754/package.json52
-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/is-interactive/index.d.ts25
-rw-r--r--node_modules/is-interactive/index.js7
-rw-r--r--node_modules/is-interactive/license9
-rw-r--r--node_modules/is-interactive/package.json41
-rw-r--r--node_modules/is-interactive/readme.md52
-rw-r--r--node_modules/is-unicode-supported/index.d.ts12
-rw-r--r--node_modules/is-unicode-supported/index.js17
-rw-r--r--node_modules/is-unicode-supported/license9
-rw-r--r--node_modules/is-unicode-supported/package.json43
-rw-r--r--node_modules/is-unicode-supported/readme.md35
-rw-r--r--node_modules/kleur/index.js104
-rw-r--r--node_modules/kleur/kleur.d.ts45
-rw-r--r--node_modules/kleur/license21
-rw-r--r--node_modules/kleur/package.json35
-rw-r--r--node_modules/kleur/readme.md172
-rw-r--r--node_modules/log-symbols/browser.js8
-rw-r--r--node_modules/log-symbols/index.d.ts22
-rw-r--r--node_modules/log-symbols/index.js20
-rw-r--r--node_modules/log-symbols/license9
-rw-r--r--node_modules/log-symbols/node_modules/chalk/license9
-rw-r--r--node_modules/log-symbols/node_modules/chalk/package.json81
-rw-r--r--node_modules/log-symbols/node_modules/chalk/readme.md325
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/index.d.ts320
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/index.js225
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/utilities.js33
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.d.ts236
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.js223
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.d.ts1
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.js30
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.d.ts55
-rw-r--r--node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.js181
-rw-r--r--node_modules/log-symbols/package.json56
-rw-r--r--node_modules/log-symbols/readme.md51
-rw-r--r--node_modules/mimic-fn/index.d.ts54
-rw-r--r--node_modules/mimic-fn/index.js13
-rw-r--r--node_modules/mimic-fn/license9
-rw-r--r--node_modules/mimic-fn/package.json42
-rw-r--r--node_modules/mimic-fn/readme.md69
-rw-r--r--node_modules/onetime/index.d.ts64
-rw-r--r--node_modules/onetime/index.js44
-rw-r--r--node_modules/onetime/license9
-rw-r--r--node_modules/onetime/package.json43
-rw-r--r--node_modules/onetime/readme.md94
-rw-r--r--node_modules/ora/index.d.ts308
-rw-r--r--node_modules/ora/index.js386
-rw-r--r--node_modules/ora/license9
-rw-r--r--node_modules/ora/node_modules/chalk/license9
-rw-r--r--node_modules/ora/node_modules/chalk/package.json81
-rw-r--r--node_modules/ora/node_modules/chalk/readme.md325
-rw-r--r--node_modules/ora/node_modules/chalk/source/index.d.ts320
-rw-r--r--node_modules/ora/node_modules/chalk/source/index.js225
-rw-r--r--node_modules/ora/node_modules/chalk/source/utilities.js33
-rw-r--r--node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts236
-rw-r--r--node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js223
-rw-r--r--node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts1
-rw-r--r--node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js30
-rw-r--r--node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts55
-rw-r--r--node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js181
-rw-r--r--node_modules/ora/package.json61
-rw-r--r--node_modules/ora/readme.md300
-rw-r--r--node_modules/ora/utilities.js85
-rw-r--r--node_modules/prompts/index.js14
-rw-r--r--node_modules/prompts/lib/dateparts/datepart.js35
-rw-r--r--node_modules/prompts/lib/dateparts/day.js42
-rw-r--r--node_modules/prompts/lib/dateparts/hours.js30
-rw-r--r--node_modules/prompts/lib/dateparts/index.js13
-rw-r--r--node_modules/prompts/lib/dateparts/meridiem.js24
-rw-r--r--node_modules/prompts/lib/dateparts/milliseconds.js28
-rw-r--r--node_modules/prompts/lib/dateparts/minutes.js28
-rw-r--r--node_modules/prompts/lib/dateparts/month.js33
-rw-r--r--node_modules/prompts/lib/dateparts/seconds.js28
-rw-r--r--node_modules/prompts/lib/dateparts/year.js28
-rw-r--r--node_modules/prompts/lib/elements/autocomplete.js264
-rw-r--r--node_modules/prompts/lib/elements/autocompleteMultiselect.js194
-rw-r--r--node_modules/prompts/lib/elements/confirm.js89
-rw-r--r--node_modules/prompts/lib/elements/date.js209
-rw-r--r--node_modules/prompts/lib/elements/index.js13
-rw-r--r--node_modules/prompts/lib/elements/multiselect.js271
-rw-r--r--node_modules/prompts/lib/elements/number.js213
-rw-r--r--node_modules/prompts/lib/elements/prompt.js68
-rw-r--r--node_modules/prompts/lib/elements/select.js175
-rw-r--r--node_modules/prompts/lib/elements/text.js208
-rw-r--r--node_modules/prompts/lib/elements/toggle.js118
-rw-r--r--node_modules/prompts/lib/index.js98
-rw-r--r--node_modules/prompts/lib/prompts.js206
-rw-r--r--node_modules/prompts/lib/util/action.js39
-rw-r--r--node_modules/prompts/lib/util/clear.js22
-rw-r--r--node_modules/prompts/lib/util/entriesToDisplay.js21
-rw-r--r--node_modules/prompts/lib/util/figures.js33
-rw-r--r--node_modules/prompts/lib/util/index.js12
-rw-r--r--node_modules/prompts/lib/util/lines.js15
-rw-r--r--node_modules/prompts/lib/util/strip.js11
-rw-r--r--node_modules/prompts/lib/util/style.js40
-rw-r--r--node_modules/prompts/lib/util/wrap.js27
-rw-r--r--node_modules/prompts/license21
-rw-r--r--node_modules/prompts/package.json53
-rwxr-xr-xnode_modules/prompts/readme.md882
-rw-r--r--node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--node_modules/readable-stream/LICENSE47
-rw-r--r--node_modules/readable-stream/README.md106
-rw-r--r--node_modules/readable-stream/errors-browser.js127
-rw-r--r--node_modules/readable-stream/errors.js116
-rw-r--r--node_modules/readable-stream/experimentalWarning.js17
-rw-r--r--node_modules/readable-stream/lib/_stream_duplex.js139
-rw-r--r--node_modules/readable-stream/lib/_stream_passthrough.js39
-rw-r--r--node_modules/readable-stream/lib/_stream_readable.js1124
-rw-r--r--node_modules/readable-stream/lib/_stream_transform.js201
-rw-r--r--node_modules/readable-stream/lib/_stream_writable.js697
-rw-r--r--node_modules/readable-stream/lib/internal/streams/async_iterator.js207
-rw-r--r--node_modules/readable-stream/lib/internal/streams/buffer_list.js210
-rw-r--r--node_modules/readable-stream/lib/internal/streams/destroy.js105
-rw-r--r--node_modules/readable-stream/lib/internal/streams/end-of-stream.js104
-rw-r--r--node_modules/readable-stream/lib/internal/streams/from-browser.js3
-rw-r--r--node_modules/readable-stream/lib/internal/streams/from.js64
-rw-r--r--node_modules/readable-stream/lib/internal/streams/pipeline.js97
-rw-r--r--node_modules/readable-stream/lib/internal/streams/state.js27
-rw-r--r--node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--node_modules/readable-stream/package.json68
-rw-r--r--node_modules/readable-stream/readable-browser.js9
-rw-r--r--node_modules/readable-stream/readable.js16
-rw-r--r--node_modules/restore-cursor/index.d.ts11
-rw-r--r--node_modules/restore-cursor/index.js11
-rw-r--r--node_modules/restore-cursor/license9
-rw-r--r--node_modules/restore-cursor/package.json55
-rw-r--r--node_modules/restore-cursor/readme.md31
-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/signal-exit/LICENSE.txt16
-rw-r--r--node_modules/signal-exit/README.md39
-rw-r--r--node_modules/signal-exit/index.js202
-rw-r--r--node_modules/signal-exit/package.json38
-rw-r--r--node_modules/signal-exit/signals.js53
-rw-r--r--node_modules/sisteransi/license21
-rwxr-xr-xnode_modules/sisteransi/package.json34
-rwxr-xr-xnode_modules/sisteransi/readme.md113
-rw-r--r--node_modules/sisteransi/src/index.js58
-rw-r--r--node_modules/sisteransi/src/sisteransi.d.ts35
-rw-r--r--node_modules/string_decoder/LICENSE48
-rw-r--r--node_modules/string_decoder/README.md47
-rw-r--r--node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--node_modules/string_decoder/package.json34
-rw-r--r--node_modules/strip-ansi/index.d.ts15
-rw-r--r--node_modules/strip-ansi/index.js9
-rw-r--r--node_modules/strip-ansi/license9
-rw-r--r--node_modules/strip-ansi/package.json57
-rw-r--r--node_modules/strip-ansi/readme.md41
-rw-r--r--node_modules/supports-color/browser.js5
-rw-r--r--node_modules/supports-color/index.js135
-rw-r--r--node_modules/supports-color/license9
-rw-r--r--node_modules/supports-color/package.json53
-rw-r--r--node_modules/supports-color/readme.md76
-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/wcwidth/.npmignore1
-rw-r--r--node_modules/wcwidth/LICENSE30
-rw-r--r--node_modules/wcwidth/Readme.md33
-rw-r--r--node_modules/wcwidth/combining.js50
-rw-r--r--node_modules/wcwidth/docs/index.md65
-rw-r--r--node_modules/wcwidth/index.js99
-rw-r--r--node_modules/wcwidth/package.json42
-rw-r--r--node_modules/wcwidth/test/index.js64
-rw-r--r--package-lock.json677
-rw-r--r--package.json18
271 files changed, 29982 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..53c37a1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+dist \ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/autopush.iml b/.idea/autopush.iml
new file mode 100644
index 0000000..0c8867d
--- /dev/null
+++ b/.idea/autopush.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$/temp" />
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+ <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/.idea/discord.xml b/.idea/discord.xml
new file mode 100644
index 0000000..d8e9561
--- /dev/null
+++ b/.idea/discord.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DiscordProjectSettings">
+ <option name="show" value="PROJECT_FILES" />
+ <option name="description" value="" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..d23208f
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="JavaScriptLibraryMappings">
+ <includedPredefinedLibrary name="Node.js Core" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..6a91e10
--- /dev/null
+++ b/.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/autopush.iml" filepath="$PROJECT_DIR$/.idea/autopush.iml" />
+ </modules>
+ </component>
+</project> \ No newline at end of file
diff --git a/autopush b/autopush
new file mode 100755
index 0000000..43bc00f
--- /dev/null
+++ b/autopush
@@ -0,0 +1,118 @@
+#!/usr/bin/env node
+
+(async () => {
+ const version = "1.0";
+
+ const ora = (await import("ora")).default;
+ const chalk = require('chalk');
+ const prompts = require('prompts');
+ const fs = require('node:fs');
+ const child_process = require('node:child_process');
+
+ console.log("autopush v" + version);
+ console.log("(c) Equestria.dev Developers");
+ console.log("");
+
+ let list = fs.readdirSync(".").filter(i => {
+ try {
+ let isDotFile = i.startsWith(".")
+ let isDirectory = fs.lstatSync("./" + i).isDirectory();
+
+ if (!isDirectory && fs.lstatSync("./" + i).isSymbolicLink()) {
+ isDirectory = fs.lstatSync(fs.readlinkSync("./" + i)).isDirectory();
+ }
+
+ return !isDotFile && isDirectory;
+ } catch (e) {
+ return false;
+ }
+ });
+
+ for (let file of list) {
+ let spinner = ora(chalk.gray("[" + file + "] ") + "Initialising...").start();
+ let root = fs.realpathSync("./" + file);
+
+ if (fs.existsSync(root + "/.git")) {
+ spinner.succeed(chalk.gray("[" + file + "] ") + "Completed");
+ } else {
+ spinner.stop();
+
+ let completed = false;
+
+ while (!completed) {
+ let response = null;
+
+ while (!response || Object.keys(response).length === 0) {
+ response = await prompts({
+ type: 'select',
+ name: 'value',
+ hint: 'What should be done?',
+ message: chalk.bold(file) + " does not contain a Git repository",
+ choices: [
+ { title: "Ignore this project", value: "ignore" },
+ { title: "Create a new repository", value: "create" },
+ { title: "Delete this project", value: "delete" },
+ { title: "Quit Autopush", value: "quit" },
+ ],
+ initial: 0
+ });
+ }
+
+ let response2 = null;
+
+ switch (response.value) {
+ case "ignore":
+ completed = true;
+ spinner.fail(chalk.gray("[" + file + "] ") + "No Git repository");
+ break;
+
+ case "create":
+ while (!response2 || Object.keys(response2).length === 0) {
+ response2 = await prompts({
+ type: 'text',
+ name: 'value',
+ message: 'Enter the URL to the Git repository'
+ });
+ }
+
+ try {
+ child_process.execFileSync("git", ["init"], { cwd: root });
+ child_process.execFileSync("git", ["add", "-A"], { cwd: root });
+ child_process.execFileSync("git", ["commit", "-m", "Initial commit"], { cwd: root });
+ child_process.execFileSync("git", ["remote", "add", "origin", response2.value], { cwd: root });
+ child_process.execFileSync("git", ["push", "--all", "origin"], { cwd: root });
+ completed = true;
+ } catch (e) {
+ spinner.fail(chalk.gray("[" + file + "] ") + e.message);
+ completed = true;
+ }
+
+ break;
+
+ case "delete":
+ while (!response2 || Object.keys(response2).length === 0) {
+ response2 = await prompts({
+ type: 'confirm',
+ name: 'value',
+ message: "Do you really want to delete this project permanently? This cannot be undone.",
+ initial: false
+ });
+ }
+
+ if (response2.value) {
+ completed = true;
+ fs.rmSync(root, { recursive: true });
+ spinner.warn(chalk.gray("[" + file + "] ") + "Deleted project");
+ }
+
+ break;
+
+ case "quit":
+ completed = true;
+ spinner.fail(chalk.gray("[" + file + "] ") + "No Git repository");
+ process.exit(1);
+ }
+ }
+ }
+ }
+})(); \ 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..57d71cd
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,418 @@
+{
+ "name": "autopush",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "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/bl": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
+ "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/cli-cursor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
+ "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
+ "dependencies": {
+ "restore-cursor": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-spinners": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
+ "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/defaults": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "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/is-interactive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
+ "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/log-symbols": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
+ "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
+ "dependencies": {
+ "chalk": "^5.0.0",
+ "is-unicode-supported": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-symbols/node_modules/chalk": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+ "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ora": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-6.1.2.tgz",
+ "integrity": "sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw==",
+ "dependencies": {
+ "bl": "^5.0.0",
+ "chalk": "^5.0.0",
+ "cli-cursor": "^4.0.0",
+ "cli-spinners": "^2.6.1",
+ "is-interactive": "^2.0.0",
+ "is-unicode-supported": "^1.1.0",
+ "log-symbols": "^5.1.0",
+ "strip-ansi": "^7.0.1",
+ "wcwidth": "^1.0.1"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ora/node_modules/chalk": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+ "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/prompts": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
+ "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
+ "dependencies": {
+ "kleur": "^3.0.3",
+ "sisteransi": "^1.0.5"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/restore-cursor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
+ "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
+ "dependencies": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "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/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
+ },
+ "node_modules/sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
+ "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
+ },
+ "node_modules/wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "dependencies": {
+ "defaults": "^1.0.3"
+ }
+ }
+ }
+}
diff --git a/node_modules/ansi-regex/index.d.ts b/node_modules/ansi-regex/index.d.ts
new file mode 100644
index 0000000..50ef64d
--- /dev/null
+++ b/node_modules/ansi-regex/index.d.ts
@@ -0,0 +1,33 @@
+export interface Options {
+ /**
+ Match only the first ANSI escape.
+
+ @default false
+ */
+ readonly onlyFirst: boolean;
+}
+
+/**
+Regular expression for matching ANSI escape codes.
+
+@example
+```
+import ansiRegex from 'ansi-regex';
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
+```
+*/
+export default function ansiRegex(options?: Options): RegExp;
diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000..130a092
--- /dev/null
+++ b/node_modules/ansi-regex/index.js
@@ -0,0 +1,8 @@
+export default function ansiRegex({onlyFirst = false} = {}) {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, onlyFirst ? undefined : 'g');
+}
diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/ansi-regex/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/ansi-regex/package.json b/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000..7bbb563
--- /dev/null
+++ b/node_modules/ansi-regex/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "ansi-regex",
+ "version": "6.0.1",
+ "description": "Regular expression for matching ANSI escape codes",
+ "license": "MIT",
+ "repository": "chalk/ansi-regex",
+ "funding": "https://github.com/chalk/ansi-regex?sponsor=1",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": ">=12"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "devDependencies": {
+ "ava": "^3.15.0",
+ "tsd": "^0.14.0",
+ "xo": "^0.38.2"
+ }
+}
diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md
new file mode 100644
index 0000000..0e17e23
--- /dev/null
+++ b/node_modules/ansi-regex/readme.md
@@ -0,0 +1,72 @@
+# ansi-regex
+
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+## Install
+
+```
+$ npm install ansi-regex
+```
+
+## Usage
+
+```js
+import ansiRegex from 'ansi-regex';
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
+```
+
+## API
+
+### ansiRegex(options?)
+
+Returns a regex for matching ANSI escape codes.
+
+#### options
+
+Type: `object`
+
+##### onlyFirst
+
+Type: `boolean`\
+Default: `false` *(Matches any ANSI escape codes in a string)*
+
+Match only the first ANSI escape.
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&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/ansi-styles/index.d.ts b/node_modules/ansi-styles/index.d.ts
new file mode 100644
index 0000000..44a907e
--- /dev/null
+++ b/node_modules/ansi-styles/index.d.ts
@@ -0,0 +1,345 @@
+declare type CSSColor =
+ | 'aliceblue'
+ | 'antiquewhite'
+ | 'aqua'
+ | 'aquamarine'
+ | 'azure'
+ | 'beige'
+ | 'bisque'
+ | 'black'
+ | 'blanchedalmond'
+ | 'blue'
+ | 'blueviolet'
+ | 'brown'
+ | 'burlywood'
+ | 'cadetblue'
+ | 'chartreuse'
+ | 'chocolate'
+ | 'coral'
+ | 'cornflowerblue'
+ | 'cornsilk'
+ | 'crimson'
+ | 'cyan'
+ | 'darkblue'
+ | 'darkcyan'
+ | 'darkgoldenrod'
+ | 'darkgray'
+ | 'darkgreen'
+ | 'darkgrey'
+ | 'darkkhaki'
+ | 'darkmagenta'
+ | 'darkolivegreen'
+ | 'darkorange'
+ | 'darkorchid'
+ | 'darkred'
+ | 'darksalmon'
+ | 'darkseagreen'
+ | 'darkslateblue'
+ | 'darkslategray'
+ | 'darkslategrey'
+ | 'darkturquoise'
+ | 'darkviolet'
+ | 'deeppink'
+ | 'deepskyblue'
+ | 'dimgray'
+ | 'dimgrey'
+ | 'dodgerblue'
+ | 'firebrick'
+ | 'floralwhite'
+ | 'forestgreen'
+ | 'fuchsia'
+ | 'gainsboro'
+ | 'ghostwhite'
+ | 'gold'
+ | 'goldenrod'
+ | 'gray'
+ | 'green'
+ | 'greenyellow'
+ | 'grey'
+ | 'honeydew'
+ | 'hotpink'
+ | 'indianred'
+ | 'indigo'
+ | 'ivory'
+ | 'khaki'
+ | 'lavender'
+ | 'lavenderblush'
+ | 'lawngreen'
+ | 'lemonchiffon'
+ | 'lightblue'
+ | 'lightcoral'
+ | 'lightcyan'
+ | 'lightgoldenrodyellow'
+ | 'lightgray'
+ | 'lightgreen'
+ | 'lightgrey'
+ | 'lightpink'
+ | 'lightsalmon'
+ | 'lightseagreen'
+ | 'lightskyblue'
+ | 'lightslategray'
+ | 'lightslategrey'
+ | 'lightsteelblue'
+ | 'lightyellow'
+ | 'lime'
+ | 'limegreen'
+ | 'linen'
+ | 'magenta'
+ | 'maroon'
+ | 'mediumaquamarine'
+ | 'mediumblue'
+ | 'mediumorchid'
+ | 'mediumpurple'
+ | 'mediumseagreen'
+ | 'mediumslateblue'
+ | 'mediumspringgreen'
+ | 'mediumturquoise'
+ | 'mediumvioletred'
+ | 'midnightblue'
+ | 'mintcream'
+ | 'mistyrose'
+ | 'moccasin'
+ | 'navajowhite'
+ | 'navy'
+ | 'oldlace'
+ | 'olive'
+ | 'olivedrab'
+ | 'orange'
+ | 'orangered'
+ | 'orchid'
+ | 'palegoldenrod'
+ | 'palegreen'
+ | 'paleturquoise'
+ | 'palevioletred'
+ | 'papayawhip'
+ | 'peachpuff'
+ | 'peru'
+ | 'pink'
+ | 'plum'
+ | 'powderblue'
+ | 'purple'
+ | 'rebeccapurple'
+ | 'red'
+ | 'rosybrown'
+ | 'royalblue'
+ | 'saddlebrown'
+ | 'salmon'
+ | 'sandybrown'
+ | 'seagreen'
+ | 'seashell'
+ | 'sienna'
+ | 'silver'
+ | 'skyblue'
+ | 'slateblue'
+ | 'slategray'
+ | 'slategrey'
+ | 'snow'
+ | 'springgreen'
+ | 'steelblue'
+ | 'tan'
+ | 'teal'
+ | 'thistle'
+ | 'tomato'
+ | 'turquoise'
+ | 'violet'
+ | 'wheat'
+ | 'white'
+ | 'whitesmoke'
+ | 'yellow'
+ | 'yellowgreen';
+
+declare namespace ansiStyles {
+ interface ColorConvert {
+ /**
+ The RGB color space.
+
+ @param red - (`0`-`255`)
+ @param green - (`0`-`255`)
+ @param blue - (`0`-`255`)
+ */
+ rgb(red: number, green: number, blue: number): string;
+
+ /**
+ The RGB HEX color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hex(hex: string): string;
+
+ /**
+ @param keyword - A CSS color name.
+ */
+ keyword(keyword: CSSColor): string;
+
+ /**
+ The HSL color space.
+
+ @param hue - (`0`-`360`)
+ @param saturation - (`0`-`100`)
+ @param lightness - (`0`-`100`)
+ */
+ hsl(hue: number, saturation: number, lightness: number): string;
+
+ /**
+ The HSV color space.
+
+ @param hue - (`0`-`360`)
+ @param saturation - (`0`-`100`)
+ @param value - (`0`-`100`)
+ */
+ hsv(hue: number, saturation: number, value: number): string;
+
+ /**
+ The HSV color space.
+
+ @param hue - (`0`-`360`)
+ @param whiteness - (`0`-`100`)
+ @param blackness - (`0`-`100`)
+ */
+ hwb(hue: number, whiteness: number, blackness: number): string;
+
+ /**
+ Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color.
+ */
+ ansi(ansi: number): string;
+
+ /**
+ Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
+ */
+ ansi256(ansi: number): string;
+ }
+
+ interface CSPair {
+ /**
+ The ANSI terminal control sequence for starting this style.
+ */
+ readonly open: string;
+
+ /**
+ The ANSI terminal control sequence for ending this style.
+ */
+ readonly close: string;
+ }
+
+ interface ColorBase {
+ readonly ansi: ColorConvert;
+ readonly ansi256: ColorConvert;
+ readonly ansi16m: ColorConvert;
+
+ /**
+ The ANSI terminal control sequence for ending this color.
+ */
+ readonly close: string;
+ }
+
+ interface Modifier {
+ /**
+ Resets the current color chain.
+ */
+ readonly reset: CSPair;
+
+ /**
+ Make text bold.
+ */
+ readonly bold: CSPair;
+
+ /**
+ Emitting only a small amount of light.
+ */
+ readonly dim: CSPair;
+
+ /**
+ Make text italic. (Not widely supported)
+ */
+ readonly italic: CSPair;
+
+ /**
+ Make text underline. (Not widely supported)
+ */
+ readonly underline: CSPair;
+
+ /**
+ Inverse background and foreground colors.
+ */
+ readonly inverse: CSPair;
+
+ /**
+ Prints the text, but makes it invisible.
+ */
+ readonly hidden: CSPair;
+
+ /**
+ Puts a horizontal line through the center of the text. (Not widely supported)
+ */
+ readonly strikethrough: CSPair;
+ }
+
+ interface ForegroundColor {
+ readonly black: CSPair;
+ readonly red: CSPair;
+ readonly green: CSPair;
+ readonly yellow: CSPair;
+ readonly blue: CSPair;
+ readonly cyan: CSPair;
+ readonly magenta: CSPair;
+ readonly white: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly gray: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly grey: CSPair;
+
+ readonly blackBright: CSPair;
+ readonly redBright: CSPair;
+ readonly greenBright: CSPair;
+ readonly yellowBright: CSPair;
+ readonly blueBright: CSPair;
+ readonly cyanBright: CSPair;
+ readonly magentaBright: CSPair;
+ readonly whiteBright: CSPair;
+ }
+
+ interface BackgroundColor {
+ readonly bgBlack: CSPair;
+ readonly bgRed: CSPair;
+ readonly bgGreen: CSPair;
+ readonly bgYellow: CSPair;
+ readonly bgBlue: CSPair;
+ readonly bgCyan: CSPair;
+ readonly bgMagenta: CSPair;
+ readonly bgWhite: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: CSPair;
+
+ readonly bgBlackBright: CSPair;
+ readonly bgRedBright: CSPair;
+ readonly bgGreenBright: CSPair;
+ readonly bgYellowBright: CSPair;
+ readonly bgBlueBright: CSPair;
+ readonly bgCyanBright: CSPair;
+ readonly bgMagentaBright: CSPair;
+ readonly bgWhiteBright: CSPair;
+ }
+}
+
+declare const ansiStyles: {
+ readonly modifier: ansiStyles.Modifier;
+ readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase;
+ readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase;
+ readonly codes: ReadonlyMap<number, number>;
+} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier;
+
+export = ansiStyles;
diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js
new file mode 100644
index 0000000..5d82581
--- /dev/null
+++ b/node_modules/ansi-styles/index.js
@@ -0,0 +1,163 @@
+'use strict';
+
+const wrapAnsi16 = (fn, offset) => (...args) => {
+ const code = fn(...args);
+ return `\u001B[${code + offset}m`;
+};
+
+const wrapAnsi256 = (fn, offset) => (...args) => {
+ const code = fn(...args);
+ return `\u001B[${38 + offset};5;${code}m`;
+};
+
+const wrapAnsi16m = (fn, offset) => (...args) => {
+ const rgb = fn(...args);
+ return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
+};
+
+const ansi2ansi = n => n;
+const rgb2rgb = (r, g, b) => [r, g, b];
+
+const setLazyProperty = (object, property, get) => {
+ Object.defineProperty(object, property, {
+ get: () => {
+ const value = get();
+
+ Object.defineProperty(object, property, {
+ value,
+ enumerable: true,
+ configurable: true
+ });
+
+ return value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+};
+
+/** @type {typeof import('color-convert')} */
+let colorConvert;
+const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
+ if (colorConvert === undefined) {
+ colorConvert = require('color-convert');
+ }
+
+ const offset = isBackground ? 10 : 0;
+ const styles = {};
+
+ for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
+ const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
+ if (sourceSpace === targetSpace) {
+ styles[name] = wrap(identity, offset);
+ } else if (typeof suite === 'object') {
+ styles[name] = wrap(suite[targetSpace], offset);
+ }
+ }
+
+ return styles;
+};
+
+function assembleStyles() {
+ const codes = new Map();
+ const styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+
+ // Bright color
+ blackBright: [90, 39],
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39]
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49]
+ }
+ };
+
+ // Alias bright black as gray (and grey)
+ styles.color.gray = styles.color.blackBright;
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
+ styles.color.grey = styles.color.blackBright;
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
+
+ for (const [groupName, group] of Object.entries(styles)) {
+ for (const [styleName, style] of Object.entries(group)) {
+ styles[styleName] = {
+ open: `\u001B[${style[0]}m`,
+ close: `\u001B[${style[1]}m`
+ };
+
+ group[styleName] = styles[styleName];
+
+ codes.set(style[0], style[1]);
+ }
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+ }
+
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false
+ });
+
+ styles.color.close = '\u001B[39m';
+ styles.bgColor.close = '\u001B[49m';
+
+ setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
+ setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
+ setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
+ setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
+ setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
+ setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
+
+ return styles;
+}
+
+// Make the export immutable
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/ansi-styles/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/ansi-styles/package.json b/node_modules/ansi-styles/package.json
new file mode 100644
index 0000000..7539328
--- /dev/null
+++ b/node_modules/ansi-styles/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "license": "MIT",
+ "repository": "chalk/ansi-styles",
+ "funding": "https://github.com/chalk/ansi-styles?sponsor=1",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd",
+ "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "devDependencies": {
+ "@types/color-convert": "^1.9.0",
+ "ava": "^2.3.0",
+ "svg-term-cli": "^2.1.1",
+ "tsd": "^0.11.0",
+ "xo": "^0.25.3"
+ }
+}
diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md
new file mode 100644
index 0000000..24883de
--- /dev/null
+++ b/node_modules/ansi-styles/readme.md
@@ -0,0 +1,152 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+<img src="screenshot.svg" width="900">
+
+## Install
+
+```
+$ npm install ansi-styles
+```
+
+## Usage
+
+```js
+const style = require('ansi-styles');
+
+console.log(`${style.green.open}Hello world!${style.green.close}`);
+
+
+// Color conversion between 16/256/truecolor
+// NOTE: If conversion goes to 16 colors or 256 colors, the original color
+// may be degraded to fit that color palette. This means terminals
+// that do not support 16 million colors will best-match the
+// original color.
+console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
+console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
+console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close);
+```
+
+## API
+
+Each style has an `open` and `close` property.
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `blackBright` (alias: `gray`, `grey`)
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+## Advanced usage
+
+By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `style.modifier`
+- `style.color`
+- `style.bgColor`
+
+###### Example
+
+```js
+console.log(style.color.green.open);
+```
+
+Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
+
+###### Example
+
+```js
+console.log(style.codes.get(36));
+//=> 39
+```
+
+## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
+
+`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
+
+The following color spaces from `color-convert` are supported:
+
+- `rgb`
+- `hex`
+- `keyword`
+- `hsl`
+- `hsv`
+- `hwb`
+- `ansi`
+- `ansi256`
+
+To use these, call the associated conversion function with the intended output, for example:
+
+```js
+style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
+style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
+
+style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+
+style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
+style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
+```
+
+## Related
+
+- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+## For enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/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/bl/.github/dependabot.yml b/node_modules/bl/.github/dependabot.yml
new file mode 100644
index 0000000..f468993
--- /dev/null
+++ b/node_modules/bl/.github/dependabot.yml
@@ -0,0 +1,16 @@
+version: 2
+updates:
+ - package-ecosystem: 'github-actions'
+ directory: '/'
+ schedule:
+ interval: 'daily'
+ commit-message:
+ prefix: 'chore'
+ include: 'scope'
+ - package-ecosystem: 'npm'
+ directory: '/'
+ schedule:
+ interval: 'daily'
+ commit-message:
+ prefix: 'chore'
+ include: 'scope'
diff --git a/node_modules/bl/.github/workflows/test-and-release.yml b/node_modules/bl/.github/workflows/test-and-release.yml
new file mode 100644
index 0000000..65887a0
--- /dev/null
+++ b/node_modules/bl/.github/workflows/test-and-release.yml
@@ -0,0 +1,61 @@
+name: Test & Maybe Release
+on: [push, pull_request]
+jobs:
+ test:
+ strategy:
+ fail-fast: false
+ matrix:
+ node: [14.x, 16.x, 18.x, lts/*, current]
+ os: [macos-latest, ubuntu-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+ - name: Use Node.js ${{ matrix.node }}
+ uses: actions/setup-node@v3.5.1
+ with:
+ node-version: ${{ matrix.node }}
+ - name: Install Dependencies
+ run: |
+ npm install --no-progress
+ - name: Run tests
+ run: |
+ npm config set script-shell bash
+ npm run test:ci
+ release:
+ name: Release
+ needs: test
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: Setup Node.js
+ uses: actions/setup-node@v3.5.1
+ with:
+ node-version: 14
+ - name: Install dependencies
+ run: |
+ npm install --no-progress --no-package-lock --no-save
+ - name: Build
+ run: |
+ npm run build
+ - name: Install plugins
+ run: |
+ npm install \
+ @semantic-release/commit-analyzer \
+ conventional-changelog-conventionalcommits \
+ @semantic-release/release-notes-generator \
+ @semantic-release/npm \
+ @semantic-release/github \
+ @semantic-release/git \
+ @semantic-release/changelog \
+ --no-progress --no-package-lock --no-save
+ - name: Release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ run: npx semantic-release
+
diff --git a/node_modules/bl/BufferList.d.ts b/node_modules/bl/BufferList.d.ts
new file mode 100644
index 0000000..1561583
--- /dev/null
+++ b/node_modules/bl/BufferList.d.ts
@@ -0,0 +1,382 @@
+export type BufferListAcceptedTypes =
+ | Buffer
+ | BufferList
+ | Uint8Array
+ | BufferListAcceptedTypes[]
+ | string
+ | number;
+
+export interface BufferListConstructor {
+ new (initData?: BufferListAcceptedTypes): BufferList;
+ (initData?: BufferListAcceptedTypes): BufferList;
+
+ /**
+ * Determines if the passed object is a BufferList. It will return true
+ * if the passed object is an instance of BufferList or BufferListStream
+ * and false otherwise.
+ *
+ * N.B. this won't return true for BufferList or BufferListStream instances
+ * created by versions of this library before this static method was added.
+ *
+ * @param other
+ */
+
+ isBufferList(other: unknown): boolean;
+}
+
+interface BufferList {
+ prototype: Object
+
+ /**
+ * Get the length of the list in bytes. This is the sum of the lengths
+ * of all of the buffers contained in the list, minus any initial offset
+ * for a semi-consumed buffer at the beginning. Should accurately
+ * represent the total number of bytes that can be read from the list.
+ */
+
+ length: number;
+
+ /**
+ * Adds an additional buffer or BufferList to the internal list.
+ * this is returned so it can be chained.
+ *
+ * @param buffer
+ */
+
+ append(buffer: BufferListAcceptedTypes): this;
+
+ /**
+ * Will return the byte at the specified index.
+ * @param index
+ */
+
+ get(index: number): number;
+
+ /**
+ * Returns a new Buffer object containing the bytes within the
+ * range specified. Both start and end are optional and will
+ * default to the beginning and end of the list respectively.
+ *
+ * If the requested range spans a single internal buffer then a
+ * slice of that buffer will be returned which shares the original
+ * memory range of that Buffer. If the range spans multiple buffers
+ * then copy operations will likely occur to give you a uniform Buffer.
+ *
+ * @param start
+ * @param end
+ */
+
+ slice(start?: number, end?: number): Buffer;
+
+ /**
+ * Returns a new BufferList object containing the bytes within the
+ * range specified. Both start and end are optional and will default
+ * to the beginning and end of the list respectively.
+ *
+ * No copies will be performed. All buffers in the result share
+ * memory with the original list.
+ *
+ * @param start
+ * @param end
+ */
+
+ shallowSlice(start?: number, end?: number): this;
+
+ /**
+ * Copies the content of the list in the `dest` buffer, starting from
+ * `destStart` and containing the bytes within the range specified
+ * with `srcStart` to `srcEnd`.
+ *
+ * `destStart`, `start` and `end` are optional and will default to the
+ * beginning of the dest buffer, and the beginning and end of the
+ * list respectively.
+ *
+ * @param dest
+ * @param destStart
+ * @param srcStart
+ * @param srcEnd
+ */
+
+ copy(
+ dest: Buffer,
+ destStart?: number,
+ srcStart?: number,
+ srcEnd?: number
+ ): Buffer;
+
+ /**
+ * Performs a shallow-copy of the list. The internal Buffers remains the
+ * same, so if you change the underlying Buffers, the change will be
+ * reflected in both the original and the duplicate.
+ *
+ * This method is needed if you want to call consume() or pipe() and
+ * still keep the original list.
+ *
+ * @example
+ *
+ * ```js
+ * var bl = new BufferListStream();
+ * bl.append('hello');
+ * bl.append(' world');
+ * bl.append('\n');
+ * bl.duplicate().pipe(process.stdout, { end: false });
+ *
+ * console.log(bl.toString())
+ * ```
+ */
+
+ duplicate(): this;
+
+ /**
+ * Will shift bytes off the start of the list. The number of bytes
+ * consumed don't need to line up with the sizes of the internal
+ * Buffers—initial offsets will be calculated accordingly in order
+ * to give you a consistent view of the data.
+ *
+ * @param bytes
+ */
+
+ consume(bytes?: number): void;
+
+ /**
+ * Will return a string representation of the buffer. The optional
+ * `start` and `end` arguments are passed on to `slice()`, while
+ * the encoding is passed on to `toString()` of the resulting Buffer.
+ *
+ * See the [`Buffer#toString()`](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end)
+ * documentation for more information.
+ *
+ * @param encoding
+ * @param start
+ * @param end
+ */
+
+ toString(encoding?: string, start?: number, end?: number): string;
+
+ /**
+ * Will return the byte at the specified index. indexOf() method
+ * returns the first index at which a given element can be found
+ * in the BufferList, or -1 if it is not present.
+ *
+ * @param value
+ * @param byteOffset
+ * @param encoding
+ */
+
+ indexOf(
+ value: string | number | Uint8Array | BufferList | Buffer,
+ byteOffset?: number,
+ encoding?: string
+ ): number;
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readDoubleBE: Buffer['readDoubleBE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readDoubleLE: Buffer['readDoubleLE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readFloatBE: Buffer['readFloatBE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readFloatLE: Buffer['readFloatLE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readInt32BE: Buffer['readInt32BE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readInt32LE: Buffer['readInt32LE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUInt32BE: Buffer['readUInt32BE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUInt32LE: Buffer['readUInt32LE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are implemented and will operate across internal Buffer boundaries transparently.
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readInt16BE: Buffer['readInt16BE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readInt16LE: Buffer['readInt16LE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUInt16BE: Buffer['readUInt16BE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUInt16LE: Buffer['readUInt16LE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readInt8: Buffer['readInt8'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUInt8: Buffer['readUInt8'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readIntBE: Buffer['readIntBE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readIntLE: Buffer['readIntLE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUIntBE: Buffer['readUIntBE'];
+
+ /**
+ * All of the standard byte-reading methods of the Buffer interface are
+ * implemented and will operate across internal Buffer boundaries transparently.
+ *
+ * See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
+ * documentation for how these work.
+ *
+ * @param offset
+ */
+
+ readUIntLE: Buffer['readUIntLE'];
+}
+
+/**
+ * No arguments are required for the constructor, but you can initialise
+ * the list by passing in a single Buffer object or an array of Buffer
+ * objects.
+ *
+ * `new` is not strictly required, if you don't instantiate a new object,
+ * it will be done automatically for you so you can create a new instance
+ * simply with:
+ *
+ * ```js
+ * const { BufferList } = require('bl')
+ * const bl = BufferList()
+ *
+ * // equivalent to:
+ *
+ * const { BufferList } = require('bl')
+ * const bl = new BufferList()
+ * ```
+ */
+
+declare const BufferList: BufferListConstructor;
diff --git a/node_modules/bl/BufferList.js b/node_modules/bl/BufferList.js
new file mode 100644
index 0000000..471ee77
--- /dev/null
+++ b/node_modules/bl/BufferList.js
@@ -0,0 +1,396 @@
+'use strict'
+
+const { Buffer } = require('buffer')
+const symbol = Symbol.for('BufferList')
+
+function BufferList (buf) {
+ if (!(this instanceof BufferList)) {
+ return new BufferList(buf)
+ }
+
+ BufferList._init.call(this, buf)
+}
+
+BufferList._init = function _init (buf) {
+ Object.defineProperty(this, symbol, { value: true })
+
+ this._bufs = []
+ this.length = 0
+
+ if (buf) {
+ this.append(buf)
+ }
+}
+
+BufferList.prototype._new = function _new (buf) {
+ return new BufferList(buf)
+}
+
+BufferList.prototype._offset = function _offset (offset) {
+ if (offset === 0) {
+ return [0, 0]
+ }
+
+ let tot = 0
+
+ for (let i = 0; i < this._bufs.length; i++) {
+ const _t = tot + this._bufs[i].length
+ if (offset < _t || i === this._bufs.length - 1) {
+ return [i, offset - tot]
+ }
+ tot = _t
+ }
+}
+
+BufferList.prototype._reverseOffset = function (blOffset) {
+ const bufferId = blOffset[0]
+ let offset = blOffset[1]
+
+ for (let i = 0; i < bufferId; i++) {
+ offset += this._bufs[i].length
+ }
+
+ return offset
+}
+
+BufferList.prototype.get = function get (index) {
+ if (index > this.length || index < 0) {
+ return undefined
+ }
+
+ const offset = this._offset(index)
+
+ return this._bufs[offset[0]][offset[1]]
+}
+
+BufferList.prototype.slice = function slice (start, end) {
+ if (typeof start === 'number' && start < 0) {
+ start += this.length
+ }
+
+ if (typeof end === 'number' && end < 0) {
+ end += this.length
+ }
+
+ return this.copy(null, 0, start, end)
+}
+
+BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
+ if (typeof srcStart !== 'number' || srcStart < 0) {
+ srcStart = 0
+ }
+
+ if (typeof srcEnd !== 'number' || srcEnd > this.length) {
+ srcEnd = this.length
+ }
+
+ if (srcStart >= this.length) {
+ return dst || Buffer.alloc(0)
+ }
+
+ if (srcEnd <= 0) {
+ return dst || Buffer.alloc(0)
+ }
+
+ const copy = !!dst
+ const off = this._offset(srcStart)
+ const len = srcEnd - srcStart
+ let bytes = len
+ let bufoff = (copy && dstStart) || 0
+ let start = off[1]
+
+ // copy/slice everything
+ if (srcStart === 0 && srcEnd === this.length) {
+ if (!copy) {
+ // slice, but full concat if multiple buffers
+ return this._bufs.length === 1
+ ? this._bufs[0]
+ : Buffer.concat(this._bufs, this.length)
+ }
+
+ // copy, need to copy individual buffers
+ for (let i = 0; i < this._bufs.length; i++) {
+ this._bufs[i].copy(dst, bufoff)
+ bufoff += this._bufs[i].length
+ }
+
+ return dst
+ }
+
+ // easy, cheap case where it's a subset of one of the buffers
+ if (bytes <= this._bufs[off[0]].length - start) {
+ return copy
+ ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
+ : this._bufs[off[0]].slice(start, start + bytes)
+ }
+
+ if (!copy) {
+ // a slice, we need something to copy in to
+ dst = Buffer.allocUnsafe(len)
+ }
+
+ for (let i = off[0]; i < this._bufs.length; i++) {
+ const l = this._bufs[i].length - start
+
+ if (bytes > l) {
+ this._bufs[i].copy(dst, bufoff, start)
+ bufoff += l
+ } else {
+ this._bufs[i].copy(dst, bufoff, start, start + bytes)
+ bufoff += l
+ break
+ }
+
+ bytes -= l
+
+ if (start) {
+ start = 0
+ }
+ }
+
+ // safeguard so that we don't return uninitialized memory
+ if (dst.length > bufoff) return dst.slice(0, bufoff)
+
+ return dst
+}
+
+BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
+ start = start || 0
+ end = typeof end !== 'number' ? this.length : end
+
+ if (start < 0) {
+ start += this.length
+ }
+
+ if (end < 0) {
+ end += this.length
+ }
+
+ if (start === end) {
+ return this._new()
+ }
+
+ const startOffset = this._offset(start)
+ const endOffset = this._offset(end)
+ const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
+
+ if (endOffset[1] === 0) {
+ buffers.pop()
+ } else {
+ buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1])
+ }
+
+ if (startOffset[1] !== 0) {
+ buffers[0] = buffers[0].slice(startOffset[1])
+ }
+
+ return this._new(buffers)
+}
+
+BufferList.prototype.toString = function toString (encoding, start, end) {
+ return this.slice(start, end).toString(encoding)
+}
+
+BufferList.prototype.consume = function consume (bytes) {
+ // first, normalize the argument, in accordance with how Buffer does it
+ bytes = Math.trunc(bytes)
+ // do nothing if not a positive number
+ if (Number.isNaN(bytes) || bytes <= 0) return this
+
+ while (this._bufs.length) {
+ if (bytes >= this._bufs[0].length) {
+ bytes -= this._bufs[0].length
+ this.length -= this._bufs[0].length
+ this._bufs.shift()
+ } else {
+ this._bufs[0] = this._bufs[0].slice(bytes)
+ this.length -= bytes
+ break
+ }
+ }
+
+ return this
+}
+
+BufferList.prototype.duplicate = function duplicate () {
+ const copy = this._new()
+
+ for (let i = 0; i < this._bufs.length; i++) {
+ copy.append(this._bufs[i])
+ }
+
+ return copy
+}
+
+BufferList.prototype.append = function append (buf) {
+ if (buf == null) {
+ return this
+ }
+
+ if (buf.buffer) {
+ // append a view of the underlying ArrayBuffer
+ this._appendBuffer(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength))
+ } else if (Array.isArray(buf)) {
+ for (let i = 0; i < buf.length; i++) {
+ this.append(buf[i])
+ }
+ } else if (this._isBufferList(buf)) {
+ // unwrap argument into individual BufferLists
+ for (let i = 0; i < buf._bufs.length; i++) {
+ this.append(buf._bufs[i])
+ }
+ } else {
+ // coerce number arguments to strings, since Buffer(number) does
+ // uninitialized memory allocation
+ if (typeof buf === 'number') {
+ buf = buf.toString()
+ }
+
+ this._appendBuffer(Buffer.from(buf))
+ }
+
+ return this
+}
+
+BufferList.prototype._appendBuffer = function appendBuffer (buf) {
+ this._bufs.push(buf)
+ this.length += buf.length
+}
+
+BufferList.prototype.indexOf = function (search, offset, encoding) {
+ if (encoding === undefined && typeof offset === 'string') {
+ encoding = offset
+ offset = undefined
+ }
+
+ if (typeof search === 'function' || Array.isArray(search)) {
+ throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')
+ } else if (typeof search === 'number') {
+ search = Buffer.from([search])
+ } else if (typeof search === 'string') {
+ search = Buffer.from(search, encoding)
+ } else if (this._isBufferList(search)) {
+ search = search.slice()
+ } else if (Array.isArray(search.buffer)) {
+ search = Buffer.from(search.buffer, search.byteOffset, search.byteLength)
+ } else if (!Buffer.isBuffer(search)) {
+ search = Buffer.from(search)
+ }
+
+ offset = Number(offset || 0)
+
+ if (isNaN(offset)) {
+ offset = 0
+ }
+
+ if (offset < 0) {
+ offset = this.length + offset
+ }
+
+ if (offset < 0) {
+ offset = 0
+ }
+
+ if (search.length === 0) {
+ return offset > this.length ? this.length : offset
+ }
+
+ const blOffset = this._offset(offset)
+ let blIndex = blOffset[0] // index of which internal buffer we're working on
+ let buffOffset = blOffset[1] // offset of the internal buffer we're working on
+
+ // scan over each buffer
+ for (; blIndex < this._bufs.length; blIndex++) {
+ const buff = this._bufs[blIndex]
+
+ while (buffOffset < buff.length) {
+ const availableWindow = buff.length - buffOffset
+
+ if (availableWindow >= search.length) {
+ const nativeSearchResult = buff.indexOf(search, buffOffset)
+
+ if (nativeSearchResult !== -1) {
+ return this._reverseOffset([blIndex, nativeSearchResult])
+ }
+
+ buffOffset = buff.length - search.length + 1 // end of native search window
+ } else {
+ const revOffset = this._reverseOffset([blIndex, buffOffset])
+
+ if (this._match(revOffset, search)) {
+ return revOffset
+ }
+
+ buffOffset++
+ }
+ }
+
+ buffOffset = 0
+ }
+
+ return -1
+}
+
+BufferList.prototype._match = function (offset, search) {
+ if (this.length - offset < search.length) {
+ return false
+ }
+
+ for (let searchOffset = 0; searchOffset < search.length; searchOffset++) {
+ if (this.get(offset + searchOffset) !== search[searchOffset]) {
+ return false
+ }
+ }
+ return true
+}
+
+;(function () {
+ const methods = {
+ readDoubleBE: 8,
+ readDoubleLE: 8,
+ readFloatBE: 4,
+ readFloatLE: 4,
+ readInt32BE: 4,
+ readInt32LE: 4,
+ readUInt32BE: 4,
+ readUInt32LE: 4,
+ readInt16BE: 2,
+ readInt16LE: 2,
+ readUInt16BE: 2,
+ readUInt16LE: 2,
+ readInt8: 1,
+ readUInt8: 1,
+ readIntBE: null,
+ readIntLE: null,
+ readUIntBE: null,
+ readUIntLE: null
+ }
+
+ for (const m in methods) {
+ (function (m) {
+ if (methods[m] === null) {
+ BufferList.prototype[m] = function (offset, byteLength) {
+ return this.slice(offset, offset + byteLength)[m](0, byteLength)
+ }
+ } else {
+ BufferList.prototype[m] = function (offset = 0) {
+ return this.slice(offset, offset + methods[m])[m](0)
+ }
+ }
+ }(m))
+ }
+}())
+
+// Used internally by the class and also as an indicator of this object being
+// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser
+// environment because there could be multiple different copies of the
+// BufferList class and some `BufferList`s might be `BufferList`s.
+BufferList.prototype._isBufferList = function _isBufferList (b) {
+ return b instanceof BufferList || BufferList.isBufferList(b)
+}
+
+BufferList.isBufferList = function isBufferList (b) {
+ return b != null && b[symbol]
+}
+
+module.exports = BufferList
diff --git a/node_modules/bl/CHANGELOG.md b/node_modules/bl/CHANGELOG.md
new file mode 100644
index 0000000..a6156dc
--- /dev/null
+++ b/node_modules/bl/CHANGELOG.md
@@ -0,0 +1,17 @@
+## [5.1.0](https://github.com/rvagg/bl/compare/v5.0.0...v5.1.0) (2022-10-18)
+
+
+### Features
+
+* added integrated TypeScript typings ([#108](https://github.com/rvagg/bl/issues/108)) ([433ff89](https://github.com/rvagg/bl/commit/433ff8942f47fab8a5c9d13b2c00989ccf8d0710))
+
+
+### Bug Fixes
+
+* windows support in tests ([387dfaf](https://github.com/rvagg/bl/commit/387dfaf9b2bca7849f12785436ceb01e42adac2c))
+
+
+### Trivial Changes
+
+* GH Actions, Dependabot, auto-release, remove Travis ([997f058](https://github.com/rvagg/bl/commit/997f058357de8f2a7f66998e80a72b491835573f))
+* **no-release:** bump standard from 16.0.4 to 17.0.0 ([#112](https://github.com/rvagg/bl/issues/112)) ([078bfe3](https://github.com/rvagg/bl/commit/078bfe33390d125297b1c946e5989c4aa9228961))
diff --git a/node_modules/bl/LICENSE.md b/node_modules/bl/LICENSE.md
new file mode 100644
index 0000000..ecbe516
--- /dev/null
+++ b/node_modules/bl/LICENSE.md
@@ -0,0 +1,13 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2013-2019 bl contributors
+----------------------------------
+
+*bl contributors listed at <https://github.com/rvagg/bl#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/bl/README.md b/node_modules/bl/README.md
new file mode 100644
index 0000000..9680b1d
--- /dev/null
+++ b/node_modules/bl/README.md
@@ -0,0 +1,247 @@
+# bl *(BufferList)*
+
+[![Build Status](https://api.travis-ci.com/rvagg/bl.svg?branch=master)](https://travis-ci.com/rvagg/bl/)
+
+**A Node.js Buffer list collector, reader and streamer thingy.**
+
+[![NPM](https://nodei.co/npm/bl.svg)](https://nodei.co/npm/bl/)
+
+**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them!
+
+The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently.
+
+```js
+const { BufferList } = require('bl')
+
+const bl = new BufferList()
+bl.append(Buffer.from('abcd'))
+bl.append(Buffer.from('efg'))
+bl.append('hi') // bl will also accept & convert Strings
+bl.append(Buffer.from('j'))
+bl.append(Buffer.from([ 0x3, 0x4 ]))
+
+console.log(bl.length) // 12
+
+console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij'
+console.log(bl.slice(3, 10).toString('ascii')) // 'defghij'
+console.log(bl.slice(3, 6).toString('ascii')) // 'def'
+console.log(bl.slice(3, 8).toString('ascii')) // 'defgh'
+console.log(bl.slice(5, 10).toString('ascii')) // 'fghij'
+
+console.log(bl.indexOf('def')) // 3
+console.log(bl.indexOf('asdf')) // -1
+
+// or just use toString!
+console.log(bl.toString()) // 'abcdefghij\u0003\u0004'
+console.log(bl.toString('ascii', 3, 8)) // 'defgh'
+console.log(bl.toString('ascii', 5, 10)) // 'fghij'
+
+// other standard Buffer readables
+console.log(bl.readUInt16BE(10)) // 0x0304
+console.log(bl.readUInt16LE(10)) // 0x0403
+```
+
+Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**:
+
+```js
+const { BufferListStream } = require('bl')
+const fs = require('fs')
+
+fs.createReadStream('README.md')
+ .pipe(BufferListStream((err, data) => { // note 'new' isn't strictly required
+ // `data` is a complete Buffer object containing the full data
+ console.log(data.toString())
+ }))
+```
+
+Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream.
+
+Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!):
+
+```js
+const hyperquest = require('hyperquest')
+const { BufferListStream } = require('bl')
+
+const url = 'https://raw.github.com/rvagg/bl/master/README.md'
+
+hyperquest(url).pipe(BufferListStream((err, data) => {
+ console.log(data.toString())
+}))
+```
+
+Or, use it as a readable stream to recompose a list of Buffers to an output source:
+
+```js
+const { BufferListStream } = require('bl')
+const fs = require('fs')
+
+var bl = new BufferListStream()
+bl.append(Buffer.from('abcd'))
+bl.append(Buffer.from('efg'))
+bl.append(Buffer.from('hi'))
+bl.append(Buffer.from('j'))
+
+bl.pipe(fs.createWriteStream('gibberish.txt'))
+```
+
+## API
+
+ * <a href="#ctor"><code><b>new BufferList([ buf ])</b></code></a>
+ * <a href="#isBufferList"><code><b>BufferList.isBufferList(obj)</b></code></a>
+ * <a href="#length"><code>bl.<b>length</b></code></a>
+ * <a href="#append"><code>bl.<b>append(buffer)</b></code></a>
+ * <a href="#get"><code>bl.<b>get(index)</b></code></a>
+ * <a href="#indexOf"><code>bl.<b>indexOf(value[, byteOffset][, encoding])</b></code></a>
+ * <a href="#slice"><code>bl.<b>slice([ start[, end ] ])</b></code></a>
+ * <a href="#shallowSlice"><code>bl.<b>shallowSlice([ start[, end ] ])</b></code></a>
+ * <a href="#copy"><code>bl.<b>copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])</b></code></a>
+ * <a href="#duplicate"><code>bl.<b>duplicate()</b></code></a>
+ * <a href="#consume"><code>bl.<b>consume(bytes)</b></code></a>
+ * <a href="#toString"><code>bl.<b>toString([encoding, [ start, [ end ]]])</b></code></a>
+ * <a href="#readXX"><code>bl.<b>readDoubleBE()</b></code>, <code>bl.<b>readDoubleLE()</b></code>, <code>bl.<b>readFloatBE()</b></code>, <code>bl.<b>readFloatLE()</b></code>, <code>bl.<b>readInt32BE()</b></code>, <code>bl.<b>readInt32LE()</b></code>, <code>bl.<b>readUInt32BE()</b></code>, <code>bl.<b>readUInt32LE()</b></code>, <code>bl.<b>readInt16BE()</b></code>, <code>bl.<b>readInt16LE()</b></code>, <code>bl.<b>readUInt16BE()</b></code>, <code>bl.<b>readUInt16LE()</b></code>, <code>bl.<b>readInt8()</b></code>, <code>bl.<b>readUInt8()</b></code></a>
+ * <a href="#ctorStream"><code><b>new BufferListStream([ callback ])</b></code></a>
+
+--------------------------------------------------------
+<a name="ctor"></a>
+### new BufferList([ Buffer | Buffer array | BufferList | BufferList array | String ])
+No arguments are _required_ for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` objects.
+
+`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
+
+```js
+const { BufferList } = require('bl')
+const bl = BufferList()
+
+// equivalent to:
+
+const { BufferList } = require('bl')
+const bl = new BufferList()
+```
+
+--------------------------------------------------------
+<a name="isBufferList"></a>
+### BufferList.isBufferList(obj)
+Determines if the passed object is a `BufferList`. It will return `true` if the passed object is an instance of `BufferList` **or** `BufferListStream` and `false` otherwise.
+
+N.B. this won't return `true` for `BufferList` or `BufferListStream` instances created by versions of this library before this static method was added.
+
+--------------------------------------------------------
+<a name="length"></a>
+### bl.length
+Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list.
+
+--------------------------------------------------------
+<a name="append"></a>
+### bl.append(Buffer | Buffer array | BufferList | BufferList array | String)
+`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained.
+
+--------------------------------------------------------
+<a name="get"></a>
+### bl.get(index)
+`get()` will return the byte at the specified index.
+
+--------------------------------------------------------
+<a name="indexOf"></a>
+### bl.indexOf(value[, byteOffset][, encoding])
+`get()` will return the byte at the specified index.
+`indexOf()` method returns the first index at which a given element can be found in the BufferList, or -1 if it is not present.
+
+--------------------------------------------------------
+<a name="slice"></a>
+### bl.slice([ start, [ end ] ])
+`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
+
+If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.
+
+--------------------------------------------------------
+<a name="shallowSlice"></a>
+### bl.shallowSlice([ start, [ end ] ])
+`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
+
+No copies will be performed. All buffers in the result share memory with the original list.
+
+--------------------------------------------------------
+<a name="copy"></a>
+### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
+`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.
+
+--------------------------------------------------------
+<a name="duplicate"></a>
+### bl.duplicate()
+`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example:
+
+```js
+var bl = new BufferListStream()
+
+bl.append('hello')
+bl.append(' world')
+bl.append('\n')
+
+bl.duplicate().pipe(process.stdout, { end: false })
+
+console.log(bl.toString())
+```
+
+--------------------------------------------------------
+<a name="consume"></a>
+### bl.consume(bytes)
+`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers&mdash;initial offsets will be calculated accordingly in order to give you a consistent view of the data.
+
+--------------------------------------------------------
+<a name="toString"></a>
+### bl.toString([encoding, [ start, [ end ]]])
+`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information.
+
+--------------------------------------------------------
+<a name="readXX"></a>
+### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
+
+All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.
+
+See the <b><code>[Buffer](http://nodejs.org/docs/latest/api/buffer.html)</code></b> documentation for how these work.
+
+--------------------------------------------------------
+<a name="ctorStream"></a>
+### new BufferListStream([ callback | Buffer | Buffer array | BufferList | BufferList array | String ])
+**BufferListStream** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **BufferListStream** instance.
+
+The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream.
+
+Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object.
+
+`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
+
+```js
+const { BufferListStream } = require('bl')
+const bl = BufferListStream()
+
+// equivalent to:
+
+const { BufferListStream } = require('bl')
+const bl = new BufferListStream()
+```
+
+N.B. For backwards compatibility reasons, `BufferListStream` is the **default** export when you `require('bl')`:
+
+```js
+const { BufferListStream } = require('bl')
+// equivalent to:
+const BufferListStream = require('bl')
+```
+
+--------------------------------------------------------
+
+## Contributors
+
+**bl** is brought to you by the following hackers:
+
+ * [Rod Vagg](https://github.com/rvagg)
+ * [Matteo Collina](https://github.com/mcollina)
+ * [Jarett Cruger](https://github.com/jcrugzz)
+
+<a name="license"></a>
+## License &amp; copyright
+
+Copyright (c) 2013-2019 bl contributors (listed above).
+
+bl is licensed under the MIT license. 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/bl/bl.js b/node_modules/bl/bl.js
new file mode 100644
index 0000000..40228f8
--- /dev/null
+++ b/node_modules/bl/bl.js
@@ -0,0 +1,84 @@
+'use strict'
+
+const DuplexStream = require('readable-stream').Duplex
+const inherits = require('inherits')
+const BufferList = require('./BufferList')
+
+function BufferListStream (callback) {
+ if (!(this instanceof BufferListStream)) {
+ return new BufferListStream(callback)
+ }
+
+ if (typeof callback === 'function') {
+ this._callback = callback
+
+ const piper = function piper (err) {
+ if (this._callback) {
+ this._callback(err)
+ this._callback = null
+ }
+ }.bind(this)
+
+ this.on('pipe', function onPipe (src) {
+ src.on('error', piper)
+ })
+ this.on('unpipe', function onUnpipe (src) {
+ src.removeListener('error', piper)
+ })
+
+ callback = null
+ }
+
+ BufferList._init.call(this, callback)
+ DuplexStream.call(this)
+}
+
+inherits(BufferListStream, DuplexStream)
+Object.assign(BufferListStream.prototype, BufferList.prototype)
+
+BufferListStream.prototype._new = function _new (callback) {
+ return new BufferListStream(callback)
+}
+
+BufferListStream.prototype._write = function _write (buf, encoding, callback) {
+ this._appendBuffer(buf)
+
+ if (typeof callback === 'function') {
+ callback()
+ }
+}
+
+BufferListStream.prototype._read = function _read (size) {
+ if (!this.length) {
+ return this.push(null)
+ }
+
+ size = Math.min(size, this.length)
+ this.push(this.slice(0, size))
+ this.consume(size)
+}
+
+BufferListStream.prototype.end = function end (chunk) {
+ DuplexStream.prototype.end.call(this, chunk)
+
+ if (this._callback) {
+ this._callback(null, this.slice())
+ this._callback = null
+ }
+}
+
+BufferListStream.prototype._destroy = function _destroy (err, cb) {
+ this._bufs.length = 0
+ this.length = 0
+ cb(err)
+}
+
+BufferListStream.prototype._isBufferList = function _isBufferList (b) {
+ return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b)
+}
+
+BufferListStream.isBufferList = BufferList.isBufferList
+
+module.exports = BufferListStream
+module.exports.BufferListStream = BufferListStream
+module.exports.BufferList = BufferList
diff --git a/node_modules/bl/index.d.ts b/node_modules/bl/index.d.ts
new file mode 100644
index 0000000..07a8ee3
--- /dev/null
+++ b/node_modules/bl/index.d.ts
@@ -0,0 +1,88 @@
+import { Duplex } from "readable-stream";
+import {
+ BufferList as BL,
+ BufferListConstructor,
+ BufferListAcceptedTypes,
+} from "./BufferList";
+
+type BufferListStreamInit =
+ | ((err: Error, buffer: Buffer) => void)
+ | BufferListAcceptedTypes;
+
+interface BufferListStreamConstructor {
+ new (initData?: BufferListStreamInit): BufferListStream;
+ (callback?: BufferListStreamInit): BufferListStream;
+
+ /**
+ * Determines if the passed object is a BufferList. It will return true
+ * if the passed object is an instance of BufferList or BufferListStream
+ * and false otherwise.
+ *
+ * N.B. this won't return true for BufferList or BufferListStream instances
+ * created by versions of this library before this static method was added.
+ *
+ * @param other
+ */
+
+ isBufferList(other: unknown): boolean;
+
+ /**
+ * Rexporting BufferList and BufferListStream to fix
+ * issue with require/commonjs import and "export = " below.
+ */
+
+ BufferList: BufferListConstructor;
+ BufferListStream: BufferListStreamConstructor;
+}
+
+interface BufferListStream extends Duplex, BL {
+ prototype: BufferListStream & BL;
+}
+
+/**
+ * BufferListStream is a Node Duplex Stream, so it can be read from
+ * and written to like a standard Node stream. You can also pipe()
+ * to and from a BufferListStream instance.
+ *
+ * The constructor takes an optional callback, if supplied, the
+ * callback will be called with an error argument followed by a
+ * reference to the bl instance, when bl.end() is called
+ * (i.e. from a piped stream).
+ *
+ * This is a convenient method of collecting the entire contents of
+ * a stream, particularly when the stream is chunky, such as a network
+ * stream.
+ *
+ * Normally, no arguments are required for the constructor, but you can
+ * initialise the list by passing in a single Buffer object or an array
+ * of Buffer object.
+ *
+ * `new` is not strictly required, if you don't instantiate a new object,
+ * it will be done automatically for you so you can create a new instance
+ * simply with:
+ *
+ * ```js
+ * const { BufferListStream } = require('bl');
+ * const bl = BufferListStream();
+ *
+ * // equivalent to:
+ *
+ * const { BufferListStream } = require('bl');
+ * const bl = new BufferListStream();
+ * ```
+ *
+ * N.B. For backwards compatibility reasons, BufferListStream is the default
+ * export when you `require('bl')`:
+ *
+ * ```js
+ * const { BufferListStream } = require('bl')
+ *
+ * // equivalent to:
+ *
+ * const BufferListStream = require('bl')
+ * ```
+ */
+
+declare const BufferListStream: BufferListStreamConstructor;
+
+export = BufferListStream;
diff --git a/node_modules/bl/package.json b/node_modules/bl/package.json
new file mode 100644
index 0000000..92a08e3
--- /dev/null
+++ b/node_modules/bl/package.json
@@ -0,0 +1,123 @@
+{
+ "name": "bl",
+ "version": "5.1.0",
+ "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
+ "license": "MIT",
+ "main": "bl.js",
+ "scripts": {
+ "lint": "standard *.js test/*.js",
+ "test": "npm run lint && npm run test:types && node test/test.js | faucet",
+ "test:ci": "npm run lint && node test/test.js && npm run test:types",
+ "test:types": "tsc --allowJs --noEmit test/test.js",
+ "build": "true"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rvagg/bl.git"
+ },
+ "homepage": "https://github.com/rvagg/bl",
+ "authors": [
+ "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
+ "Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
+ "Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
+ ],
+ "keywords": [
+ "buffer",
+ "buffers",
+ "stream",
+ "awesomesauce"
+ ],
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ },
+ "devDependencies": {
+ "@types/readable-stream": "^2.3.13",
+ "faucet": "~0.0.1",
+ "standard": "^17.0.0",
+ "tape": "^5.2.2",
+ "typescript": "~4.7.3"
+ },
+ "release": {
+ "branches": [
+ "master"
+ ],
+ "plugins": [
+ [
+ "@semantic-release/commit-analyzer",
+ {
+ "preset": "conventionalcommits",
+ "releaseRules": [
+ {
+ "breaking": true,
+ "release": "major"
+ },
+ {
+ "revert": true,
+ "release": "patch"
+ },
+ {
+ "type": "feat",
+ "release": "minor"
+ },
+ {
+ "type": "fix",
+ "release": "patch"
+ },
+ {
+ "type": "chore",
+ "release": "patch"
+ },
+ {
+ "type": "docs",
+ "release": "patch"
+ },
+ {
+ "type": "test",
+ "release": "patch"
+ },
+ {
+ "scope": "no-release",
+ "release": false
+ }
+ ]
+ }
+ ],
+ [
+ "@semantic-release/release-notes-generator",
+ {
+ "preset": "conventionalcommits",
+ "presetConfig": {
+ "types": [
+ {
+ "type": "feat",
+ "section": "Features"
+ },
+ {
+ "type": "fix",
+ "section": "Bug Fixes"
+ },
+ {
+ "type": "chore",
+ "section": "Trivial Changes"
+ },
+ {
+ "type": "docs",
+ "section": "Trivial Changes"
+ },
+ {
+ "type": "test",
+ "section": "Tests"
+ }
+ ]
+ }
+ }
+ ],
+ "@semantic-release/changelog",
+ "@semantic-release/npm",
+ "@semantic-release/github",
+ "@semantic-release/git"
+ ]
+ }
+}
diff --git a/node_modules/bl/test/convert.js b/node_modules/bl/test/convert.js
new file mode 100644
index 0000000..9f3e235
--- /dev/null
+++ b/node_modules/bl/test/convert.js
@@ -0,0 +1,21 @@
+'use strict'
+
+const tape = require('tape')
+const { BufferList, BufferListStream } = require('../')
+const { Buffer } = require('buffer')
+
+tape('convert from BufferList to BufferListStream', (t) => {
+ const data = Buffer.from(`TEST-${Date.now()}`)
+ const bl = new BufferList(data)
+ const bls = new BufferListStream(bl)
+ t.ok(bl.slice().equals(bls.slice()))
+ t.end()
+})
+
+tape('convert from BufferListStream to BufferList', (t) => {
+ const data = Buffer.from(`TEST-${Date.now()}`)
+ const bls = new BufferListStream(data)
+ const bl = new BufferList(bls)
+ t.ok(bl.slice().equals(bls.slice()))
+ t.end()
+})
diff --git a/node_modules/bl/test/indexOf.js b/node_modules/bl/test/indexOf.js
new file mode 100644
index 0000000..62dcb01
--- /dev/null
+++ b/node_modules/bl/test/indexOf.js
@@ -0,0 +1,492 @@
+'use strict'
+
+const tape = require('tape')
+const BufferList = require('../')
+const { Buffer } = require('buffer')
+
+tape('indexOf single byte needle', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg', '12345'])
+
+ t.equal(bl.indexOf('e'), 4)
+ t.equal(bl.indexOf('e', 5), 11)
+ t.equal(bl.indexOf('e', 12), -1)
+ t.equal(bl.indexOf('5'), 18)
+
+ t.end()
+})
+
+tape('indexOf multiple byte needle', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+
+ t.equal(bl.indexOf('ef'), 4)
+ t.equal(bl.indexOf('ef', 5), 11)
+
+ t.end()
+})
+
+tape('indexOf multiple byte needles across buffer boundaries', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+
+ t.equal(bl.indexOf('fgabc'), 5)
+
+ t.end()
+})
+
+tape('indexOf takes a Uint8Array search', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+ const search = new Uint8Array([102, 103, 97, 98, 99]) // fgabc
+
+ t.equal(bl.indexOf(search), 5)
+
+ t.end()
+})
+
+tape('indexOf takes a buffer list search', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+ const search = new BufferList('fgabc')
+
+ t.equal(bl.indexOf(search), 5)
+
+ t.end()
+})
+
+tape('indexOf a zero byte needle', (t) => {
+ const b = new BufferList('abcdef')
+ const bufEmpty = Buffer.from('')
+
+ t.equal(b.indexOf(''), 0)
+ t.equal(b.indexOf('', 1), 1)
+ t.equal(b.indexOf('', b.length + 1), b.length)
+ t.equal(b.indexOf('', Infinity), b.length)
+ t.equal(b.indexOf(bufEmpty), 0)
+ t.equal(b.indexOf(bufEmpty, 1), 1)
+ t.equal(b.indexOf(bufEmpty, b.length + 1), b.length)
+ t.equal(b.indexOf(bufEmpty, Infinity), b.length)
+
+ t.end()
+})
+
+tape('indexOf buffers smaller and larger than the needle', (t) => {
+ const bl = new BufferList(['abcdefg', 'a', 'bcdefg', 'a', 'bcfgab'])
+
+ t.equal(bl.indexOf('fgabc'), 5)
+ t.equal(bl.indexOf('fgabc', 6), 12)
+ t.equal(bl.indexOf('fgabc', 13), -1)
+
+ t.end()
+})
+
+// only present in node 6+
+;(process.version.substr(1).split('.')[0] >= 6) && tape('indexOf latin1 and binary encoding', (t) => {
+ const b = new BufferList('abcdef')
+
+ // test latin1 encoding
+ t.equal(
+ new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
+ .indexOf('d', 0, 'latin1'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
+ .indexOf(Buffer.from('d', 'latin1'), 0, 'latin1'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from('aa\u00e8aa', 'latin1'))
+ .indexOf('\u00e8', 'latin1'),
+ 2
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'latin1'))
+ .indexOf('\u00e8', 'latin1'),
+ 0
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'latin1'))
+ .indexOf(Buffer.from('\u00e8', 'latin1'), 'latin1'),
+ 0
+ )
+
+ // test binary encoding
+ t.equal(
+ new BufferList(Buffer.from(b.toString('binary'), 'binary'))
+ .indexOf('d', 0, 'binary'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from(b.toString('binary'), 'binary'))
+ .indexOf(Buffer.from('d', 'binary'), 0, 'binary'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from('aa\u00e8aa', 'binary'))
+ .indexOf('\u00e8', 'binary'),
+ 2
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'binary'))
+ .indexOf('\u00e8', 'binary'),
+ 0
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'binary'))
+ .indexOf(Buffer.from('\u00e8', 'binary'), 'binary'),
+ 0
+ )
+
+ t.end()
+})
+
+tape('indexOf the entire nodejs10 buffer test suite', (t) => {
+ const b = new BufferList('abcdef')
+ const bufA = Buffer.from('a')
+ const bufBc = Buffer.from('bc')
+ const bufF = Buffer.from('f')
+ const bufZ = Buffer.from('z')
+
+ const stringComparison = 'abcdef'
+
+ t.equal(b.indexOf('a'), 0)
+ t.equal(b.indexOf('a', 1), -1)
+ t.equal(b.indexOf('a', -1), -1)
+ t.equal(b.indexOf('a', -4), -1)
+ t.equal(b.indexOf('a', -b.length), 0)
+ t.equal(b.indexOf('a', NaN), 0)
+ t.equal(b.indexOf('a', -Infinity), 0)
+ t.equal(b.indexOf('a', Infinity), -1)
+ t.equal(b.indexOf('bc'), 1)
+ t.equal(b.indexOf('bc', 2), -1)
+ t.equal(b.indexOf('bc', -1), -1)
+ t.equal(b.indexOf('bc', -3), -1)
+ t.equal(b.indexOf('bc', -5), 1)
+ t.equal(b.indexOf('bc', NaN), 1)
+ t.equal(b.indexOf('bc', -Infinity), 1)
+ t.equal(b.indexOf('bc', Infinity), -1)
+ t.equal(b.indexOf('f'), b.length - 1)
+ t.equal(b.indexOf('z'), -1)
+
+ // empty search tests
+ t.equal(b.indexOf(bufA), 0)
+ t.equal(b.indexOf(bufA, 1), -1)
+ t.equal(b.indexOf(bufA, -1), -1)
+ t.equal(b.indexOf(bufA, -4), -1)
+ t.equal(b.indexOf(bufA, -b.length), 0)
+ t.equal(b.indexOf(bufA, NaN), 0)
+ t.equal(b.indexOf(bufA, -Infinity), 0)
+ t.equal(b.indexOf(bufA, Infinity), -1)
+ t.equal(b.indexOf(bufBc), 1)
+ t.equal(b.indexOf(bufBc, 2), -1)
+ t.equal(b.indexOf(bufBc, -1), -1)
+ t.equal(b.indexOf(bufBc, -3), -1)
+ t.equal(b.indexOf(bufBc, -5), 1)
+ t.equal(b.indexOf(bufBc, NaN), 1)
+ t.equal(b.indexOf(bufBc, -Infinity), 1)
+ t.equal(b.indexOf(bufBc, Infinity), -1)
+ t.equal(b.indexOf(bufF), b.length - 1)
+ t.equal(b.indexOf(bufZ), -1)
+ t.equal(b.indexOf(0x61), 0)
+ t.equal(b.indexOf(0x61, 1), -1)
+ t.equal(b.indexOf(0x61, -1), -1)
+ t.equal(b.indexOf(0x61, -4), -1)
+ t.equal(b.indexOf(0x61, -b.length), 0)
+ t.equal(b.indexOf(0x61, NaN), 0)
+ t.equal(b.indexOf(0x61, -Infinity), 0)
+ t.equal(b.indexOf(0x61, Infinity), -1)
+ t.equal(b.indexOf(0x0), -1)
+
+ // test offsets
+ t.equal(b.indexOf('d', 2), 3)
+ t.equal(b.indexOf('f', 5), 5)
+ t.equal(b.indexOf('f', -1), 5)
+ t.equal(b.indexOf('f', 6), -1)
+
+ t.equal(b.indexOf(Buffer.from('d'), 2), 3)
+ t.equal(b.indexOf(Buffer.from('f'), 5), 5)
+ t.equal(b.indexOf(Buffer.from('f'), -1), 5)
+ t.equal(b.indexOf(Buffer.from('f'), 6), -1)
+
+ t.equal(Buffer.from('ff').indexOf(Buffer.from('f'), 1, 'ucs2'), -1)
+
+ // test invalid and uppercase encoding
+ t.equal(b.indexOf('b', 'utf8'), 1)
+ t.equal(b.indexOf('b', 'UTF8'), 1)
+ t.equal(b.indexOf('62', 'HEX'), 1)
+ t.throws(() => b.indexOf('bad', 'enc'), TypeError)
+
+ // test hex encoding
+ t.equal(
+ Buffer.from(b.toString('hex'), 'hex')
+ .indexOf('64', 0, 'hex'),
+ 3
+ )
+ t.equal(
+ Buffer.from(b.toString('hex'), 'hex')
+ .indexOf(Buffer.from('64', 'hex'), 0, 'hex'),
+ 3
+ )
+
+ // test base64 encoding
+ t.equal(
+ Buffer.from(b.toString('base64'), 'base64')
+ .indexOf('ZA==', 0, 'base64'),
+ 3
+ )
+ t.equal(
+ Buffer.from(b.toString('base64'), 'base64')
+ .indexOf(Buffer.from('ZA==', 'base64'), 0, 'base64'),
+ 3
+ )
+
+ // test ascii encoding
+ t.equal(
+ Buffer.from(b.toString('ascii'), 'ascii')
+ .indexOf('d', 0, 'ascii'),
+ 3
+ )
+ t.equal(
+ Buffer.from(b.toString('ascii'), 'ascii')
+ .indexOf(Buffer.from('d', 'ascii'), 0, 'ascii'),
+ 3
+ )
+
+ // test optional offset with passed encoding
+ t.equal(Buffer.from('aaaa0').indexOf('30', 'hex'), 4)
+ t.equal(Buffer.from('aaaa00a').indexOf('3030', 'hex'), 4)
+
+ {
+ // test usc2 encoding
+ const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
+
+ t.equal(8, twoByteString.indexOf('\u0395', 4, 'ucs2'))
+ t.equal(6, twoByteString.indexOf('\u03a3', -4, 'ucs2'))
+ t.equal(4, twoByteString.indexOf('\u03a3', -6, 'ucs2'))
+ t.equal(4, twoByteString.indexOf(
+ Buffer.from('\u03a3', 'ucs2'), -6, 'ucs2'))
+ t.equal(-1, twoByteString.indexOf('\u03a3', -2, 'ucs2'))
+ }
+
+ const mixedByteStringUcs2 =
+ Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395', 'ucs2')
+
+ t.equal(6, mixedByteStringUcs2.indexOf('bc', 0, 'ucs2'))
+ t.equal(10, mixedByteStringUcs2.indexOf('\u03a3', 0, 'ucs2'))
+ t.equal(-1, mixedByteStringUcs2.indexOf('\u0396', 0, 'ucs2'))
+
+ t.equal(
+ 6, mixedByteStringUcs2.indexOf(Buffer.from('bc', 'ucs2'), 0, 'ucs2'))
+ t.equal(
+ 10, mixedByteStringUcs2.indexOf(Buffer.from('\u03a3', 'ucs2'), 0, 'ucs2'))
+ t.equal(
+ -1, mixedByteStringUcs2.indexOf(Buffer.from('\u0396', 'ucs2'), 0, 'ucs2'))
+
+ {
+ const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
+
+ // Test single char pattern
+ t.equal(0, twoByteString.indexOf('\u039a', 0, 'ucs2'))
+ let index = twoByteString.indexOf('\u0391', 0, 'ucs2')
+ t.equal(2, index, `Alpha - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3', 0, 'ucs2')
+ t.equal(4, index, `First Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3', 6, 'ucs2')
+ t.equal(6, index, `Second Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u0395', 0, 'ucs2')
+ t.equal(8, index, `Epsilon - at index ${index}`)
+ index = twoByteString.indexOf('\u0392', 0, 'ucs2')
+ t.equal(-1, index, `Not beta - at index ${index}`)
+
+ // Test multi-char pattern
+ index = twoByteString.indexOf('\u039a\u0391', 0, 'ucs2')
+ t.equal(0, index, `Lambda Alpha - at index ${index}`)
+ index = twoByteString.indexOf('\u0391\u03a3', 0, 'ucs2')
+ t.equal(2, index, `Alpha Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3\u03a3', 0, 'ucs2')
+ t.equal(4, index, `Sigma Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3\u0395', 0, 'ucs2')
+ t.equal(6, index, `Sigma Epsilon - at index ${index}`)
+ }
+
+ const mixedByteStringUtf8 = Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395')
+
+ t.equal(5, mixedByteStringUtf8.indexOf('bc'))
+ t.equal(5, mixedByteStringUtf8.indexOf('bc', 5))
+ t.equal(5, mixedByteStringUtf8.indexOf('bc', -8))
+ t.equal(7, mixedByteStringUtf8.indexOf('\u03a3'))
+ t.equal(-1, mixedByteStringUtf8.indexOf('\u0396'))
+
+ // Test complex string indexOf algorithms. Only trigger for long strings.
+ // Long string that isn't a simple repeat of a shorter string.
+ let longString = 'A'
+ for (let i = 66; i < 76; i++) { // from 'B' to 'K'
+ longString = longString + String.fromCharCode(i) + longString
+ }
+
+ const longBufferString = Buffer.from(longString)
+
+ // pattern of 15 chars, repeated every 16 chars in long
+ let pattern = 'ABACABADABACABA'
+ for (let i = 0; i < longBufferString.length - pattern.length; i += 7) {
+ const index = longBufferString.indexOf(pattern, i)
+ t.equal((i + 15) & ~0xf, index,
+ `Long ABACABA...-string at index ${i}`)
+ }
+
+ let index = longBufferString.indexOf('AJABACA')
+ t.equal(510, index, `Long AJABACA, First J - at index ${index}`)
+ index = longBufferString.indexOf('AJABACA', 511)
+ t.equal(1534, index, `Long AJABACA, Second J - at index ${index}`)
+
+ pattern = 'JABACABADABACABA'
+ index = longBufferString.indexOf(pattern)
+ t.equal(511, index, `Long JABACABA..., First J - at index ${index}`)
+ index = longBufferString.indexOf(pattern, 512)
+ t.equal(
+ 1535, index, `Long JABACABA..., Second J - at index ${index}`)
+
+ // Search for a non-ASCII string in a pure ASCII string.
+ const asciiString = Buffer.from(
+ 'somethingnotatallsinisterwhichalsoworks')
+ t.equal(-1, asciiString.indexOf('\x2061'))
+ t.equal(3, asciiString.indexOf('eth', 0))
+
+ // Search in string containing many non-ASCII chars.
+ const allCodePoints = []
+ for (let i = 0; i < 65536; i++) {
+ allCodePoints[i] = i
+ }
+
+ const allCharsString = String.fromCharCode.apply(String, allCodePoints)
+ const allCharsBufferUtf8 = Buffer.from(allCharsString)
+ const allCharsBufferUcs2 = Buffer.from(allCharsString, 'ucs2')
+
+ // Search for string long enough to trigger complex search with ASCII pattern
+ // and UC16 subject.
+ t.equal(-1, allCharsBufferUtf8.indexOf('notfound'))
+ t.equal(-1, allCharsBufferUcs2.indexOf('notfound'))
+
+ // Needle is longer than haystack, but only because it's encoded as UTF-16
+ t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'ucs2'), -1)
+
+ t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'utf8'), 0)
+ t.equal(Buffer.from('aaaa').indexOf('你好', 'ucs2'), -1)
+
+ // Haystack has odd length, but the needle is UCS2.
+ t.equal(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1)
+
+ {
+ // Find substrings in Utf8.
+ const lengths = [1, 3, 15] // Single char, simple and complex.
+ const indices = [0x5, 0x60, 0x400, 0x680, 0x7ee, 0xFF02, 0x16610, 0x2f77b]
+ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+ for (let i = 0; i < indices.length; i++) {
+ const index = indices[i]
+ let length = lengths[lengthIndex]
+
+ if (index + length > 0x7F) {
+ length = 2 * length
+ }
+
+ if (index + length > 0x7FF) {
+ length = 3 * length
+ }
+
+ if (index + length > 0xFFFF) {
+ length = 4 * length
+ }
+
+ const patternBufferUtf8 = allCharsBufferUtf8.slice(index, index + length)
+ t.equal(index, allCharsBufferUtf8.indexOf(patternBufferUtf8))
+
+ const patternStringUtf8 = patternBufferUtf8.toString()
+ t.equal(index, allCharsBufferUtf8.indexOf(patternStringUtf8))
+ }
+ }
+ }
+
+ {
+ // Find substrings in Usc2.
+ const lengths = [2, 4, 16] // Single char, simple and complex.
+ const indices = [0x5, 0x65, 0x105, 0x205, 0x285, 0x2005, 0x2085, 0xfff0]
+
+ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+ for (let i = 0; i < indices.length; i++) {
+ const index = indices[i] * 2
+ const length = lengths[lengthIndex]
+
+ const patternBufferUcs2 =
+ allCharsBufferUcs2.slice(index, index + length)
+ t.equal(
+ index, allCharsBufferUcs2.indexOf(patternBufferUcs2, 0, 'ucs2'))
+
+ const patternStringUcs2 = patternBufferUcs2.toString('ucs2')
+ t.equal(
+ index, allCharsBufferUcs2.indexOf(patternStringUcs2, 0, 'ucs2'))
+ }
+ }
+ }
+
+ [
+ () => {},
+ {},
+ []
+ ].forEach((val) => {
+ t.throws(() => b.indexOf(val), TypeError, `"${JSON.stringify(val)}" should throw`)
+ })
+
+ // Test weird offset arguments.
+ // The following offsets coerce to NaN or 0, searching the whole Buffer
+ t.equal(b.indexOf('b', undefined), 1)
+ t.equal(b.indexOf('b', {}), 1)
+ t.equal(b.indexOf('b', 0), 1)
+ t.equal(b.indexOf('b', null), 1)
+ t.equal(b.indexOf('b', []), 1)
+
+ // The following offset coerces to 2, in other words +[2] === 2
+ t.equal(b.indexOf('b', [2]), -1)
+
+ // Behavior should match String.indexOf()
+ t.equal(
+ b.indexOf('b', undefined),
+ stringComparison.indexOf('b', undefined))
+ t.equal(
+ b.indexOf('b', {}),
+ stringComparison.indexOf('b', {}))
+ t.equal(
+ b.indexOf('b', 0),
+ stringComparison.indexOf('b', 0))
+ t.equal(
+ b.indexOf('b', null),
+ stringComparison.indexOf('b', null))
+ t.equal(
+ b.indexOf('b', []),
+ stringComparison.indexOf('b', []))
+ t.equal(
+ b.indexOf('b', [2]),
+ stringComparison.indexOf('b', [2]))
+
+ // test truncation of Number arguments to uint8
+ {
+ const buf = Buffer.from('this is a test')
+
+ t.equal(buf.indexOf(0x6973), 3)
+ t.equal(buf.indexOf(0x697320), 4)
+ t.equal(buf.indexOf(0x69732069), 2)
+ t.equal(buf.indexOf(0x697374657374), 0)
+ t.equal(buf.indexOf(0x69737374), 0)
+ t.equal(buf.indexOf(0x69737465), 11)
+ t.equal(buf.indexOf(0x69737465), 11)
+ t.equal(buf.indexOf(-140), 0)
+ t.equal(buf.indexOf(-152), 1)
+ t.equal(buf.indexOf(0xff), -1)
+ t.equal(buf.indexOf(0xffff), -1)
+ }
+
+ // Test that Uint8Array arguments are okay.
+ {
+ const needle = new Uint8Array([0x66, 0x6f, 0x6f])
+ const haystack = new BufferList(Buffer.from('a foo b foo'))
+ t.equal(haystack.indexOf(needle), 2)
+ }
+
+ t.end()
+})
diff --git a/node_modules/bl/test/isBufferList.js b/node_modules/bl/test/isBufferList.js
new file mode 100644
index 0000000..9d895d5
--- /dev/null
+++ b/node_modules/bl/test/isBufferList.js
@@ -0,0 +1,32 @@
+'use strict'
+
+const tape = require('tape')
+const { BufferList, BufferListStream } = require('../')
+const { Buffer } = require('buffer')
+
+tape('isBufferList positives', (t) => {
+ t.ok(BufferList.isBufferList(new BufferList()))
+ t.ok(BufferList.isBufferList(new BufferListStream()))
+
+ t.end()
+})
+
+tape('isBufferList negatives', (t) => {
+ const types = [
+ null,
+ undefined,
+ NaN,
+ true,
+ false,
+ {},
+ [],
+ Buffer.alloc(0),
+ [Buffer.alloc(0)]
+ ]
+
+ for (const obj of types) {
+ t.notOk(BufferList.isBufferList(obj))
+ }
+
+ t.end()
+})
diff --git a/node_modules/bl/test/test.js b/node_modules/bl/test/test.js
new file mode 100644
index 0000000..668dc17
--- /dev/null
+++ b/node_modules/bl/test/test.js
@@ -0,0 +1,914 @@
+// @ts-check
+'use strict'
+
+const tape = require('tape')
+const crypto = require('crypto')
+const fs = require('fs')
+const path = require('path')
+const os = require('os')
+const BufferListStream = require('../')
+const { Buffer } = require('buffer')
+
+/**
+ * This typedef allows us to add _bufs to the API without declaring it publicly on types.
+ * @typedef { BufferListStream & { _bufs?: Buffer[] }} BufferListStreamWithPrivate
+ */
+
+/**
+ * Just for typechecking in js
+ * @type { NodeJS.Process & { browser?: boolean }}
+ */
+
+const process = globalThis.process
+
+/** @type {BufferEncoding[]} */
+const encodings = ['ascii', 'utf8', 'utf-8', 'hex', 'binary', 'base64']
+
+if (process.browser) {
+ encodings.push(
+ 'ucs2',
+ 'ucs-2',
+ 'utf16le',
+ /**
+ * This alias is not in typescript typings for BufferEncoding. Still have to fix
+ * @see https://nodejs.org/api/buffer.html#buffers-and-character-encodings
+ */
+ // @ts-ignore
+ 'utf-16le'
+ )
+}
+
+require('./indexOf')
+require('./isBufferList')
+require('./convert')
+
+tape('single bytes from single buffer', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abcd'))
+
+ t.equal(bl.length, 4)
+ t.equal(bl.get(-1), undefined)
+ t.equal(bl.get(0), 97)
+ t.equal(bl.get(1), 98)
+ t.equal(bl.get(2), 99)
+ t.equal(bl.get(3), 100)
+ t.equal(bl.get(4), undefined)
+
+ t.end()
+})
+
+tape('single bytes from multiple buffers', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.get(0), 97)
+ t.equal(bl.get(1), 98)
+ t.equal(bl.get(2), 99)
+ t.equal(bl.get(3), 100)
+ t.equal(bl.get(4), 101)
+ t.equal(bl.get(5), 102)
+ t.equal(bl.get(6), 103)
+ t.equal(bl.get(7), 104)
+ t.equal(bl.get(8), 105)
+ t.equal(bl.get(9), 106)
+
+ t.end()
+})
+
+tape('multi bytes from single buffer', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abcd'))
+
+ t.equal(bl.length, 4)
+
+ t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
+ t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
+ t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
+ t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
+
+ t.end()
+})
+
+tape('multi bytes from single buffer (negative indexes)', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('buffer'))
+
+ t.equal(bl.length, 6)
+
+ t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
+ t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
+ t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
+
+ t.end()
+})
+
+tape('multiple bytes from multiple buffers', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+ t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+ t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+ t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+ t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+ t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
+
+ t.end()
+})
+
+tape('multiple bytes from multiple buffer lists', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(new BufferListStream([Buffer.from('abcd'), Buffer.from('efg')]))
+ bl.append(new BufferListStream([Buffer.from('hi'), Buffer.from('j')]))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+ t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+ t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+ t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+ t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+
+ t.end()
+})
+
+// same data as previous test, just using nested constructors
+tape('multiple bytes from crazy nested buffer lists', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(
+ new BufferListStream([
+ new BufferListStream([
+ new BufferListStream(Buffer.from('abc')),
+ Buffer.from('d'),
+ new BufferListStream(Buffer.from('efg'))
+ ]),
+ new BufferListStream([Buffer.from('hi')]),
+ new BufferListStream(Buffer.from('j'))
+ ])
+ )
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+ t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+ t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+ t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+ t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+
+ t.end()
+})
+
+tape('append accepts arrays of Buffers', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abc'))
+ bl.append([Buffer.from('def')])
+ bl.append([Buffer.from('ghi'), Buffer.from('jkl')])
+ bl.append([Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz')])
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('append accepts arrays of Uint8Arrays', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(new Uint8Array([97, 98, 99]))
+ bl.append([Uint8Array.from([100, 101, 102])])
+ bl.append([new Uint8Array([103, 104, 105]), new Uint8Array([106, 107, 108])])
+ bl.append([new Uint8Array([109, 110, 111, 112]), new Uint8Array([113, 114, 115, 116, 117]), new Uint8Array([118, 119, 120, 121, 122])])
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('append accepts arrays of BufferLists', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abc'))
+ bl.append([new BufferListStream('def')])
+ bl.append(
+ new BufferListStream([Buffer.from('ghi'), new BufferListStream('jkl')])
+ )
+ bl.append([
+ Buffer.from('mnop'),
+ new BufferListStream([Buffer.from('qrstu'), Buffer.from('vwxyz')])
+ ])
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('append chainable', function (t) {
+ const bl = new BufferListStream()
+
+ t.ok(bl.append(Buffer.from('abcd')) === bl)
+ t.ok(bl.append([Buffer.from('abcd')]) === bl)
+ t.ok(bl.append(new BufferListStream(Buffer.from('abcd'))) === bl)
+ t.ok(bl.append([new BufferListStream(Buffer.from('abcd'))]) === bl)
+
+ t.end()
+})
+
+tape('append chainable (test results)', function (t) {
+ const bl = new BufferListStream('abc')
+ .append([new BufferListStream('def')])
+ .append(
+ new BufferListStream([Buffer.from('ghi'), new BufferListStream('jkl')])
+ )
+ .append([
+ Buffer.from('mnop'),
+ new BufferListStream([Buffer.from('qrstu'), Buffer.from('vwxyz')])
+ ])
+
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('consuming from multiple buffers', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+ bl.consume(3)
+ t.equal(bl.length, 7)
+ t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
+
+ bl.consume(2)
+ t.equal(bl.length, 5)
+ t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
+
+ bl.consume(1)
+ t.equal(bl.length, 4)
+ t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
+
+ bl.consume(1)
+ t.equal(bl.length, 3)
+ t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
+
+ bl.consume(2)
+ t.equal(bl.length, 1)
+ t.equal(bl.slice(0, 1).toString('ascii'), 'j')
+
+ t.end()
+})
+
+tape('complete consumption', function (t) {
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('a'))
+ bl.append(Buffer.from('b'))
+
+ bl.consume(2)
+
+ t.equal(bl.length, 0)
+ t.equal(bl._bufs.length, 0)
+
+ t.end()
+})
+
+tape('test readUInt8 / readInt8', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferListStream()
+
+ buf1[0] = 0x1
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUInt8(), 0x1)
+ t.equal(bl.readUInt8(2), 0x3)
+ t.equal(bl.readInt8(2), 0x3)
+ t.equal(bl.readUInt8(3), 0x4)
+ t.equal(bl.readInt8(3), 0x4)
+ t.equal(bl.readUInt8(4), 0x23)
+ t.equal(bl.readInt8(4), 0x23)
+ t.equal(bl.readUInt8(5), 0x42)
+ t.equal(bl.readInt8(5), 0x42)
+
+ t.end()
+})
+
+tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferListStream()
+
+ buf1[0] = 0x1
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUInt16BE(), 0x0100)
+ t.equal(bl.readUInt16LE(), 0x0001)
+ t.equal(bl.readUInt16BE(2), 0x0304)
+ t.equal(bl.readUInt16LE(2), 0x0403)
+ t.equal(bl.readInt16BE(2), 0x0304)
+ t.equal(bl.readInt16LE(2), 0x0403)
+ t.equal(bl.readUInt16BE(3), 0x0423)
+ t.equal(bl.readUInt16LE(3), 0x2304)
+ t.equal(bl.readInt16BE(3), 0x0423)
+ t.equal(bl.readInt16LE(3), 0x2304)
+ t.equal(bl.readUInt16BE(4), 0x2342)
+ t.equal(bl.readUInt16LE(4), 0x4223)
+ t.equal(bl.readInt16BE(4), 0x2342)
+ t.equal(bl.readInt16LE(4), 0x4223)
+
+ t.end()
+})
+
+tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferListStream()
+
+ buf1[0] = 0x1
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUInt32BE(), 0x01000304)
+ t.equal(bl.readUInt32LE(), 0x04030001)
+ t.equal(bl.readUInt32BE(2), 0x03042342)
+ t.equal(bl.readUInt32LE(2), 0x42230403)
+ t.equal(bl.readInt32BE(2), 0x03042342)
+ t.equal(bl.readInt32LE(2), 0x42230403)
+
+ t.end()
+})
+
+tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferListStream()
+
+ buf2[0] = 0x2
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+ buf3[2] = 0x61
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUIntBE(1, 1), 0x02)
+ t.equal(bl.readUIntBE(1, 2), 0x0203)
+ t.equal(bl.readUIntBE(1, 3), 0x020304)
+ t.equal(bl.readUIntBE(1, 4), 0x02030423)
+ t.equal(bl.readUIntBE(1, 5), 0x0203042342)
+ t.equal(bl.readUIntBE(1, 6), 0x020304234261)
+ t.equal(bl.readUIntLE(1, 1), 0x02)
+ t.equal(bl.readUIntLE(1, 2), 0x0302)
+ t.equal(bl.readUIntLE(1, 3), 0x040302)
+ t.equal(bl.readUIntLE(1, 4), 0x23040302)
+ t.equal(bl.readUIntLE(1, 5), 0x4223040302)
+ t.equal(bl.readUIntLE(1, 6), 0x614223040302)
+ t.equal(bl.readIntBE(1, 1), 0x02)
+ t.equal(bl.readIntBE(1, 2), 0x0203)
+ t.equal(bl.readIntBE(1, 3), 0x020304)
+ t.equal(bl.readIntBE(1, 4), 0x02030423)
+ t.equal(bl.readIntBE(1, 5), 0x0203042342)
+ t.equal(bl.readIntBE(1, 6), 0x020304234261)
+ t.equal(bl.readIntLE(1, 1), 0x02)
+ t.equal(bl.readIntLE(1, 2), 0x0302)
+ t.equal(bl.readIntLE(1, 3), 0x040302)
+ t.equal(bl.readIntLE(1, 4), 0x23040302)
+ t.equal(bl.readIntLE(1, 5), 0x4223040302)
+ t.equal(bl.readIntLE(1, 6), 0x614223040302)
+
+ t.end()
+})
+
+tape('test readFloatLE / readFloatBE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferListStream()
+
+ buf1[0] = 0x01
+ buf2[1] = 0x00
+ buf2[2] = 0x00
+ buf3[0] = 0x80
+ buf3[1] = 0x3f
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ const canonical = Buffer.concat([buf1, buf2, buf3])
+ t.equal(bl.readFloatLE(), canonical.readFloatLE())
+ t.equal(bl.readFloatBE(), canonical.readFloatBE())
+ t.equal(bl.readFloatLE(2), canonical.readFloatLE(2))
+ t.equal(bl.readFloatBE(2), canonical.readFloatBE(2))
+
+ t.end()
+})
+
+tape('test readDoubleLE / readDoubleBE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(10)
+ const bl = new BufferListStream()
+
+ buf1[0] = 0x01
+ buf2[1] = 0x55
+ buf2[2] = 0x55
+ buf3[0] = 0x55
+ buf3[1] = 0x55
+ buf3[2] = 0x55
+ buf3[3] = 0x55
+ buf3[4] = 0xd5
+ buf3[5] = 0x3f
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ const canonical = Buffer.concat([buf1, buf2, buf3])
+ t.equal(bl.readDoubleBE(), canonical.readDoubleBE())
+ t.equal(bl.readDoubleLE(), canonical.readDoubleLE())
+ t.equal(bl.readDoubleBE(2), canonical.readDoubleBE(2))
+ t.equal(bl.readDoubleLE(2), canonical.readDoubleLE(2))
+
+ t.end()
+})
+
+tape('test toString', function (t) {
+ const bl = new BufferListStream()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
+ t.equal(bl.toString('ascii', 3, 10), 'defghij')
+ t.equal(bl.toString('ascii', 3, 6), 'def')
+ t.equal(bl.toString('ascii', 3, 8), 'defgh')
+ t.equal(bl.toString('ascii', 5, 10), 'fghij')
+
+ t.end()
+})
+
+tape('test toString encoding', function (t) {
+ const bl = new BufferListStream()
+ const b = Buffer.from('abcdefghij\xff\x00')
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+ bl.append(Buffer.from('\xff\x00'))
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc), enc)
+ })
+
+ t.end()
+})
+
+tape('uninitialized memory', function (t) {
+ const secret = crypto.randomBytes(256)
+ for (let i = 0; i < 1e6; i++) {
+ const clone = Buffer.from(secret)
+ const bl = new BufferListStream()
+ bl.append(Buffer.from('a'))
+ bl.consume(-1024)
+ const buf = bl.slice(1)
+ if (buf.indexOf(clone) !== -1) {
+ t.fail(`Match (at ${i})`)
+ break
+ }
+ }
+ t.end()
+})
+
+!process.browser && tape('test stream', function (t) {
+ const random = crypto.randomBytes(65534)
+
+ const bl = new BufferListStream((err, buf) => {
+ t.ok(Buffer.isBuffer(buf))
+ t.ok(err === null)
+ t.ok(random.equals(bl.slice()))
+ t.ok(random.equals(buf.slice()))
+
+ bl.pipe(fs.createWriteStream(path.join(os.tmpdir(), 'bl_test_rnd_out.dat')))
+ .on('close', function () {
+ const rndhash = crypto.createHash('md5').update(random).digest('hex')
+ const md5sum = crypto.createHash('md5')
+ const s = fs.createReadStream(path.join(os.tmpdir(), 'bl_test_rnd_out.dat'))
+
+ s.on('data', md5sum.update.bind(md5sum))
+ s.on('end', function () {
+ t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
+ t.end()
+ })
+ })
+ })
+
+ fs.writeFileSync(path.join(os.tmpdir(), 'bl_test_rnd.dat'), random)
+ fs.createReadStream(path.join(os.tmpdir(), 'bl_test_rnd.dat')).pipe(bl)
+})
+
+tape('instantiation with Buffer', function (t) {
+ const buf = crypto.randomBytes(1024)
+ const buf2 = crypto.randomBytes(1024)
+ let b = BufferListStream(buf)
+
+ t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
+ b = BufferListStream([buf, buf2])
+ t.equal(b.slice().toString('hex'), Buffer.concat([buf, buf2]).toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('test String appendage', function (t) {
+ const bl = new BufferListStream()
+ const b = Buffer.from('abcdefghij\xff\x00')
+
+ bl.append('abcd')
+ bl.append('efg')
+ bl.append('hi')
+ bl.append('j')
+ bl.append('\xff\x00')
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc))
+ })
+
+ t.end()
+})
+
+tape('test Number appendage', function (t) {
+ const bl = new BufferListStream()
+ const b = Buffer.from('1234567890')
+
+ bl.append(1234)
+ bl.append(567)
+ bl.append(89)
+ bl.append(0)
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc))
+ })
+
+ t.end()
+})
+
+tape('write nothing, should get empty buffer', function (t) {
+ t.plan(3)
+ BufferListStream(function (err, data) {
+ t.notOk(err, 'no error')
+ t.ok(Buffer.isBuffer(data), 'got a buffer')
+ t.equal(0, data.length, 'got a zero-length buffer')
+ t.end()
+ }).end()
+})
+
+tape('unicode string', function (t) {
+ t.plan(2)
+
+ const inp1 = '\u2600'
+ const inp2 = '\u2603'
+ const exp = inp1 + ' and ' + inp2
+ const bl = BufferListStream()
+
+ bl.write(inp1)
+ bl.write(' and ')
+ bl.write(inp2)
+ t.equal(exp, bl.toString())
+ t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex'))
+})
+
+tape('should emit finish', function (t) {
+ const source = BufferListStream()
+ const dest = BufferListStream()
+
+ source.write('hello')
+ source.pipe(dest)
+
+ dest.on('finish', function () {
+ t.equal(dest.toString('utf8'), 'hello')
+ t.end()
+ })
+})
+
+tape('basic copy', function (t) {
+ const buf = crypto.randomBytes(1024)
+ const buf2 = Buffer.alloc(1024)
+ const b = BufferListStream(buf)
+
+ b.copy(buf2)
+ t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy after many appends', function (t) {
+ const buf = crypto.randomBytes(512)
+ const buf2 = Buffer.alloc(1024)
+ const b = BufferListStream(buf)
+
+ b.append(buf)
+ b.copy(buf2)
+ t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy at a precise position', function (t) {
+ const buf = crypto.randomBytes(1004)
+ const buf2 = Buffer.alloc(1024)
+ const b = BufferListStream(buf)
+
+ b.copy(buf2, 20)
+ t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy starting from a precise location', function (t) {
+ const buf = crypto.randomBytes(10)
+ const buf2 = Buffer.alloc(5)
+ const b = BufferListStream(buf)
+
+ b.copy(buf2, 0, 5)
+ t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy in an interval', function (t) {
+ const rnd = crypto.randomBytes(10)
+ const b = BufferListStream(rnd) // put the random bytes there
+ const actual = Buffer.alloc(3)
+ const expected = Buffer.alloc(3)
+
+ rnd.copy(expected, 0, 5, 8)
+ b.copy(actual, 0, 5, 8)
+
+ t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy an interval between two buffers', function (t) {
+ const buf = crypto.randomBytes(10)
+ const buf2 = Buffer.alloc(10)
+ const b = BufferListStream(buf)
+
+ b.append(buf)
+ b.copy(buf2, 0, 5, 15)
+
+ t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('shallow slice across buffer boundaries', function (t) {
+ const bl = new BufferListStream(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
+
+ t.end()
+})
+
+tape('shallow slice within single buffer', function (t) {
+ t.plan(2)
+
+ const bl = new BufferListStream(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
+ t.equal(bl.shallowSlice(7, 10).toString(), 'con')
+
+ t.end()
+})
+
+tape('shallow slice single buffer', function (t) {
+ t.plan(3)
+
+ const bl = new BufferListStream(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(0, 5).toString(), 'First')
+ t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
+ t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
+})
+
+tape('shallow slice with negative or omitted indices', function (t) {
+ t.plan(4)
+
+ const bl = new BufferListStream(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
+ t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
+ t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
+ t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
+})
+
+tape('shallow slice does not make a copy', function (t) {
+ t.plan(1)
+
+ const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+ const bl = new BufferListStream(buffers).shallowSlice(5, -3)
+
+ buffers[1].fill('h')
+ buffers[2].fill('h')
+
+ t.equal(bl.toString(), 'hhhhhhhh')
+})
+
+tape('shallow slice with 0 length', function (t) {
+ t.plan(1)
+
+ const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+ const bl = (new BufferListStream(buffers)).shallowSlice(0, 0)
+
+ t.equal(bl.length, 0)
+})
+
+tape('shallow slice with 0 length from middle', function (t) {
+ t.plan(1)
+
+ const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+ const bl = (new BufferListStream(buffers)).shallowSlice(10, 10)
+
+ t.equal(bl.length, 0)
+})
+
+tape('duplicate', function (t) {
+ t.plan(2)
+
+ const bl = new BufferListStream('abcdefghij\xff\x00')
+ const dup = bl.duplicate()
+
+ t.equal(bl.prototype, dup.prototype)
+ t.equal(bl.toString('hex'), dup.toString('hex'))
+})
+
+tape('destroy no pipe', function (t) {
+ t.plan(2)
+
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream('alsdkfja;lsdkfja;lsdk')
+
+ bl.destroy()
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+})
+
+tape('destroy with error', function (t) {
+ t.plan(3)
+
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream('alsdkfja;lsdkfja;lsdk')
+ const err = new Error('kaboom')
+
+ bl.destroy(err)
+ bl.on('error', function (_err) {
+ t.equal(_err, err)
+ })
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+})
+
+!process.browser && tape('destroy with pipe before read end', function (t) {
+ t.plan(2)
+
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream()
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .pipe(bl)
+
+ bl.destroy()
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+})
+
+!process.browser && tape('destroy with pipe before read end with race', function (t) {
+ t.plan(2)
+
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream()
+
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .pipe(bl)
+
+ setTimeout(function () {
+ bl.destroy()
+ setTimeout(function () {
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+ }, 500)
+ }, 500)
+})
+
+!process.browser && tape('destroy with pipe after read end', function (t) {
+ t.plan(2)
+
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream()
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .on('end', onEnd)
+ .pipe(bl)
+
+ function onEnd () {
+ bl.destroy()
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+ }
+})
+
+!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
+ t.plan(4)
+
+ /** @type {BufferListStreamWithPrivate} */
+ const bl = new BufferListStream()
+ const ds = new BufferListStream()
+
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .on('end', onEnd)
+ .pipe(bl)
+
+ function onEnd () {
+ bl.pipe(ds)
+
+ setTimeout(function () {
+ bl.destroy()
+
+ t.equals(bl._bufs.length, 0)
+ t.equals(bl.length, 0)
+
+ ds.destroy()
+
+ t.equals(bl._bufs.length, 0)
+ t.equals(bl.length, 0)
+ }, 100)
+ }
+})
+
+!process.browser && tape('handle error', function (t) {
+ t.plan(2)
+
+ fs.createReadStream('/does/not/exist').pipe(BufferListStream(function (err, data) {
+ t.ok(err instanceof Error, 'has error')
+ t.notOk(data, 'no data')
+ }))
+})
diff --git a/node_modules/buffer/AUTHORS.md b/node_modules/buffer/AUTHORS.md
new file mode 100644
index 0000000..468aa19
--- /dev/null
+++ b/node_modules/buffer/AUTHORS.md
@@ -0,0 +1,73 @@
+# Authors
+
+#### Ordered by first contribution.
+
+- Romain Beauxis (toots@rastageeks.org)
+- Tobias Koppers (tobias.koppers@googlemail.com)
+- Janus (ysangkok@gmail.com)
+- Rainer Dreyer (rdrey1@gmail.com)
+- Tõnis Tiigi (tonistiigi@gmail.com)
+- James Halliday (mail@substack.net)
+- Michael Williamson (mike@zwobble.org)
+- elliottcable (github@elliottcable.name)
+- rafael (rvalle@livelens.net)
+- Andrew Kelley (superjoe30@gmail.com)
+- Andreas Madsen (amwebdk@gmail.com)
+- Mike Brevoort (mike.brevoort@pearson.com)
+- Brian White (mscdex@mscdex.net)
+- Feross Aboukhadijeh (feross@feross.org)
+- Ruben Verborgh (ruben@verborgh.org)
+- eliang (eliang.cs@gmail.com)
+- Jesse Tane (jesse.tane@gmail.com)
+- Alfonso Boza (alfonso@cloud.com)
+- Mathias Buus (mathiasbuus@gmail.com)
+- Devon Govett (devongovett@gmail.com)
+- Daniel Cousens (github@dcousens.com)
+- Joseph Dykstra (josephdykstra@gmail.com)
+- Parsha Pourkhomami (parshap+git@gmail.com)
+- Damjan Košir (damjan.kosir@gmail.com)
+- daverayment (dave.rayment@gmail.com)
+- kawanet (u-suke@kawa.net)
+- Linus Unnebäck (linus@folkdatorn.se)
+- Nolan Lawson (nolan.lawson@gmail.com)
+- Calvin Metcalf (calvin.metcalf@gmail.com)
+- Koki Takahashi (hakatasiloving@gmail.com)
+- Guy Bedford (guybedford@gmail.com)
+- Jan Schär (jscissr@gmail.com)
+- RaulTsc (tomescu.raul@gmail.com)
+- Matthieu Monsch (monsch@alum.mit.edu)
+- Dan Ehrenberg (littledan@chromium.org)
+- Kirill Fomichev (fanatid@ya.ru)
+- Yusuke Kawasaki (u-suke@kawa.net)
+- DC (dcposch@dcpos.ch)
+- John-David Dalton (john.david.dalton@gmail.com)
+- adventure-yunfei (adventure030@gmail.com)
+- Emil Bay (github@tixz.dk)
+- Sam Sudar (sudar.sam@gmail.com)
+- Volker Mische (volker.mische@gmail.com)
+- David Walton (support@geekstocks.com)
+- Сковорода Никита Андреевич (chalkerx@gmail.com)
+- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com)
+- ukstv (sergey.ukustov@machinomy.com)
+- Renée Kooi (renee@kooi.me)
+- ranbochen (ranbochen@qq.com)
+- Vladimir Borovik (bobahbdb@gmail.com)
+- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com)
+- kumavis (aaron@kumavis.me)
+- Sergey Ukustov (sergey.ukustov@machinomy.com)
+- Fei Liu (liu.feiwood@gmail.com)
+- Blaine Bublitz (blaine.bublitz@gmail.com)
+- clement (clement@seald.io)
+- Koushik Dutta (koushd@gmail.com)
+- Jordan Harband (ljharb@gmail.com)
+- Niklas Mischkulnig (mischnic@users.noreply.github.com)
+- Nikolai Vavilov (vvnicholas@gmail.com)
+- Fedor Nezhivoi (gyzerok@users.noreply.github.com)
+- shuse2 (shus.toda@gmail.com)
+- Peter Newman (peternewman@users.noreply.github.com)
+- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com)
+- jkkang (jkkang@smartauth.kr)
+- Deklan Webster (deklanw@gmail.com)
+- Martin Heidegger (martin.heidegger@gmail.com)
+
+#### Generated by bin/update-authors.sh.
diff --git a/node_modules/buffer/LICENSE b/node_modules/buffer/LICENSE
new file mode 100644
index 0000000..d6bf75d
--- /dev/null
+++ b/node_modules/buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh, and other contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/buffer/README.md b/node_modules/buffer/README.md
new file mode 100644
index 0000000..451e235
--- /dev/null
+++ b/node_modules/buffer/README.md
@@ -0,0 +1,410 @@
+# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/buffer
+[npm-image]: https://img.shields.io/npm/v/buffer.svg
+[npm-url]: https://npmjs.org/package/buffer
+[downloads-image]: https://img.shields.io/npm/dm/buffer.svg
+[downloads-url]: https://npmjs.org/package/buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### The buffer module from [node.js](https://nodejs.org/), for the browser.
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg
+[saucelabs-url]: https://saucelabs.com/u/buffer
+
+With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module.
+
+The goal is to provide an API that is 100% identical to
+[node's Buffer API](https://nodejs.org/api/buffer.html). Read the
+[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
+instance methods, and class methods that are supported.
+
+## features
+
+- Manipulate binary data like a boss, in all browsers!
+- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`)
+- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments)
+- Excellent browser support (Chrome, Firefox, Edge, Safari 11+, iOS 11+, Android, etc.)
+- Preserves Node API exactly, with one minor difference (see below)
+- Square-bracket `buf[4]` notation works!
+- Does not modify any browser prototypes or put anything on `window`
+- Comprehensive test suite (including all buffer tests from node.js core)
+
+## install
+
+To use this module directly (without browserify), install it:
+
+```bash
+npm install buffer
+```
+
+This module was previously called **native-buffer-browserify**, but please use **buffer**
+from now on.
+
+If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer).
+
+## usage
+
+The module's API is identical to node's `Buffer` API. Read the
+[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
+instance methods, and class methods that are supported.
+
+As mentioned above, `require('buffer')` or use the `Buffer` global with
+[browserify](http://browserify.org) and this module will automatically be included
+in your bundle. Almost any npm module will work in the browser, even if it assumes that
+the node `Buffer` API will be available.
+
+To depend on this module explicitly (without browserify), require it like this:
+
+```js
+var Buffer = require('buffer/').Buffer // note: the trailing slash is important!
+```
+
+To require this module explicitly, use `require('buffer/')` which tells the node.js module
+lookup algorithm (also used by browserify) to use the **npm module** named `buffer`
+instead of the **node.js core** module named `buffer`!
+
+
+## how does it work?
+
+The Buffer constructor returns instances of `Uint8Array` that have their prototype
+changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`,
+so the returned instances will have all the node `Buffer` methods and the
+`Uint8Array` methods. Square bracket notation works as expected -- it returns a
+single octet.
+
+The `Uint8Array` prototype remains unmodified.
+
+
+## tracking the latest node api
+
+This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer
+API is considered **stable** in the
+[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index),
+so it is unlikely that there will ever be breaking changes.
+Nonetheless, when/if the Buffer API changes in node, this module's API will change
+accordingly.
+
+## related packages
+
+- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer
+- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer
+- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package
+
+## conversion packages
+
+### convert typed array to buffer
+
+Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast.
+
+### convert buffer to typed array
+
+`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`.
+
+### convert blob to buffer
+
+Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`.
+
+### convert buffer to blob
+
+To convert a `Buffer` to a `Blob`, use the `Blob` constructor:
+
+```js
+var blob = new Blob([ buffer ])
+```
+
+Optionally, specify a mimetype:
+
+```js
+var blob = new Blob([ buffer ], { type: 'text/html' })
+```
+
+### convert arraybuffer to buffer
+
+To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast.
+
+```js
+var buffer = Buffer.from(arrayBuffer)
+```
+
+### convert buffer to arraybuffer
+
+To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects):
+
+```js
+var arrayBuffer = buffer.buffer.slice(
+ buffer.byteOffset, buffer.byteOffset + buffer.byteLength
+)
+```
+
+Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module.
+
+## performance
+
+See perf tests in `/perf`.
+
+`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a
+sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will
+always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module,
+which is included to compare against.
+
+NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README.
+
+### Chrome 38
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ |
+| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | |
+| | | | |
+| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | |
+| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | |
+| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | |
+| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | |
+| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | |
+| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ |
+| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ |
+| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ |
+| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | |
+| | | | |
+| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | |
+| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | |
+| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ |
+
+
+### Firefox 33
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | |
+| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ |
+| | | | |
+| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | |
+| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | |
+| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | |
+| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | |
+| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | |
+| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | |
+| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | |
+| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ |
+| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | |
+| | | | |
+| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | |
+| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | |
+| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ |
+
+### Safari 8
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ |
+| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | |
+| | | | |
+| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | |
+| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | |
+| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | |
+| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | |
+| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | |
+| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | |
+| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | |
+| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ |
+| | | | |
+| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | |
+| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | |
+| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | |
+| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ |
+
+
+### Node 0.11.14
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | |
+| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ |
+| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | |
+| | | | |
+| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | |
+| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ |
+| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | |
+| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ |
+| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | |
+| | | | |
+| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | |
+| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ |
+| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | |
+| | | | |
+| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | |
+| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | |
+| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | |
+| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ |
+| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | |
+| | | | |
+| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ |
+| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | |
+| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ |
+| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | |
+| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | |
+| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | |
+| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | |
+| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ |
+| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | |
+| | | | |
+| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | |
+| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ |
+| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | |
+
+### iojs 1.8.1
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | |
+| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | |
+| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ |
+| | | | |
+| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | |
+| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | |
+| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | |
+| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | |
+| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | |
+| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ |
+| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | |
+| | | | |
+| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | |
+| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | |
+| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | |
+| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ |
+| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | |
+| | | | |
+| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ |
+| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | |
+| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ |
+| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | |
+| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | |
+| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | |
+| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | |
+| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | |
+| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | |
+| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ |
+| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | |
+| | | | |
+
+## Testing the project
+
+First, install the project:
+
+ npm install
+
+Then, to run tests in Node.js, run:
+
+ npm run test-node
+
+To test locally in a browser, you can run:
+
+ npm run test-browser-es5-local # For ES5 browsers that don't support ES6
+ npm run test-browser-es6-local # For ES6 compliant browsers
+
+This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap).
+
+To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run:
+
+ npm test
+
+This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files.
+
+## JavaScript Standard Style
+
+This module uses [JavaScript Standard Style](https://github.com/feross/standard).
+
+[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+To test that the code conforms to the style, `npm install` and run:
+
+ ./node_modules/.bin/standard
+
+## credit
+
+This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify).
+
+## Security Policies and Procedures
+
+The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues.
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.
diff --git a/node_modules/buffer/index.d.ts b/node_modules/buffer/index.d.ts
new file mode 100644
index 0000000..07096a2
--- /dev/null
+++ b/node_modules/buffer/index.d.ts
@@ -0,0 +1,194 @@
+export class Buffer extends Uint8Array {
+ length: number
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
+ toString(encoding?: string, start?: number, end?: number): string;
+ toJSON(): { type: 'Buffer', data: any[] };
+ equals(otherBuffer: Buffer): boolean;
+ compare(otherBuffer: Uint8Array, 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;
+ readBigUInt64LE(offset: number): BigInt;
+ readBigUInt64BE(offset: number): BigInt;
+ 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;
+ readBigInt64LE(offset: number): BigInt;
+ readBigInt64BE(offset: number): BigInt;
+ readFloatLE(offset: number, noAssert?: boolean): number;
+ readFloatBE(offset: number, noAssert?: boolean): number;
+ readDoubleLE(offset: number, noAssert?: boolean): number;
+ readDoubleBE(offset: number, noAssert?: boolean): number;
+ reverse(): this;
+ swap16(): Buffer;
+ swap32(): Buffer;
+ swap64(): Buffer;
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeBigUInt64LE(value: number, offset: number): BigInt;
+ writeBigUInt64BE(value: number, offset: number): BigInt;
+ 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;
+ writeBigInt64LE(value: number, offset: number): BigInt;
+ writeBigInt64BE(value: number, offset: number): BigInt;
+ writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+ fill(value: any, offset?: number, end?: number): this;
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ */
+ constructor (str: string, encoding?: string);
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ */
+ constructor (size: number);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: Uint8Array);
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ */
+ constructor (arrayBuffer: ArrayBuffer);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: any[]);
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ */
+ constructor (buffer: Buffer);
+ prototype: Buffer;
+ /**
+ * Allocates a new Buffer using an {array} of octets.
+ *
+ * @param array
+ */
+ static from(array: any[]): Buffer;
+ /**
+ * When passed a reference to the .buffer property of a TypedArray instance,
+ * the newly created Buffer will share the same allocated memory as the TypedArray.
+ * The optional {byteOffset} and {length} arguments specify a memory range
+ * within the {arrayBuffer} that will be shared by the Buffer.
+ *
+ * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
+ * @param byteOffset
+ * @param length
+ */
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new Buffer instance.
+ *
+ * @param buffer
+ */
+ static from(buffer: Buffer | Uint8Array): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ *
+ * @param str
+ */
+ static from(str: string, encoding?: string): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ static isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ static isEncoding(encoding: string): boolean;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
+ static byteLength(string: string, encoding?: string): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
+ static concat(list: Uint8Array[], totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ static 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 initializing
+ */
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafeSlow(size: number): Buffer;
+}
diff --git a/node_modules/buffer/index.js b/node_modules/buffer/index.js
new file mode 100644
index 0000000..7a0e9c2
--- /dev/null
+++ b/node_modules/buffer/index.js
@@ -0,0 +1,2106 @@
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+/* eslint-disable no-proto */
+
+'use strict'
+
+const base64 = require('base64-js')
+const ieee754 = require('ieee754')
+const customInspectSymbol =
+ (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation
+ ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
+ : null
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+
+const 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 {
+ const arr = new Uint8Array(1)
+ const proto = { foo: function () { return 42 } }
+ Object.setPrototypeOf(proto, Uint8Array.prototype)
+ Object.setPrototypeOf(arr, proto)
+ return arr.foo() === 42
+ } catch (e) {
+ return false
+ }
+}
+
+Object.defineProperty(Buffer.prototype, 'parent', {
+ enumerable: true,
+ get: function () {
+ if (!Buffer.isBuffer(this)) return undefined
+ return this.buffer
+ }
+})
+
+Object.defineProperty(Buffer.prototype, 'offset', {
+ enumerable: true,
+ get: function () {
+ if (!Buffer.isBuffer(this)) return undefined
+ return this.byteOffset
+ }
+})
+
+function createBuffer (length) {
+ if (length > K_MAX_LENGTH) {
+ throw new RangeError('The value "' + length + '" is invalid for option "size"')
+ }
+ // Return an augmented `Uint8Array` instance
+ const buf = new Uint8Array(length)
+ Object.setPrototypeOf(buf, Buffer.prototype)
+ return buf
+}
+
+/**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+function Buffer (arg, encodingOrOffset, length) {
+ // Common case.
+ if (typeof arg === 'number') {
+ if (typeof encodingOrOffset === 'string') {
+ throw new TypeError(
+ 'The "string" argument must be of type string. Received type number'
+ )
+ }
+ return allocUnsafe(arg)
+ }
+ return from(arg, encodingOrOffset, length)
+}
+
+Buffer.poolSize = 8192 // not used by this implementation
+
+function from (value, encodingOrOffset, length) {
+ if (typeof value === 'string') {
+ return fromString(value, encodingOrOffset)
+ }
+
+ if (ArrayBuffer.isView(value)) {
+ return fromArrayView(value)
+ }
+
+ if (value == null) {
+ throw new TypeError(
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+ 'or Array-like Object. Received type ' + (typeof value)
+ )
+ }
+
+ if (isInstance(value, ArrayBuffer) ||
+ (value && isInstance(value.buffer, ArrayBuffer))) {
+ return fromArrayBuffer(value, encodingOrOffset, length)
+ }
+
+ if (typeof SharedArrayBuffer !== 'undefined' &&
+ (isInstance(value, SharedArrayBuffer) ||
+ (value && isInstance(value.buffer, SharedArrayBuffer)))) {
+ return fromArrayBuffer(value, encodingOrOffset, length)
+ }
+
+ if (typeof value === 'number') {
+ throw new TypeError(
+ 'The "value" argument must not be of type number. Received type number'
+ )
+ }
+
+ const valueOf = value.valueOf && value.valueOf()
+ if (valueOf != null && valueOf !== value) {
+ return Buffer.from(valueOf, encodingOrOffset, length)
+ }
+
+ const b = fromObject(value)
+ if (b) return b
+
+ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
+ typeof value[Symbol.toPrimitive] === 'function') {
+ return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)
+ }
+
+ throw new TypeError(
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+ 'or Array-like Object. Received type ' + (typeof value)
+ )
+}
+
+/**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+Buffer.from = function (value, encodingOrOffset, length) {
+ return from(value, encodingOrOffset, length)
+}
+
+// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
+// https://github.com/feross/buffer/pull/148
+Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
+Object.setPrototypeOf(Buffer, Uint8Array)
+
+function assertSize (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be of type number')
+ } else if (size < 0) {
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
+ }
+}
+
+function alloc (size, fill, encoding) {
+ assertSize(size)
+ if (size <= 0) {
+ return createBuffer(size)
+ }
+ if (fill !== undefined) {
+ // Only pay attention to encoding if it's a string. This
+ // prevents accidentally sending in a number that would
+ // be interpreted as a start offset.
+ return typeof encoding === 'string'
+ ? createBuffer(size).fill(fill, encoding)
+ : createBuffer(size).fill(fill)
+ }
+ return createBuffer(size)
+}
+
+/**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+Buffer.alloc = function (size, fill, encoding) {
+ return alloc(size, fill, encoding)
+}
+
+function allocUnsafe (size) {
+ assertSize(size)
+ return createBuffer(size < 0 ? 0 : checked(size) | 0)
+}
+
+/**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+Buffer.allocUnsafe = function (size) {
+ return allocUnsafe(size)
+}
+/**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+Buffer.allocUnsafeSlow = function (size) {
+ return allocUnsafe(size)
+}
+
+function fromString (string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8'
+ }
+
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+
+ const length = byteLength(string, encoding) | 0
+ let buf = createBuffer(length)
+
+ const 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) {
+ const length = array.length < 0 ? 0 : checked(array.length) | 0
+ const buf = createBuffer(length)
+ for (let i = 0; i < length; i += 1) {
+ buf[i] = array[i] & 255
+ }
+ return buf
+}
+
+function fromArrayView (arrayView) {
+ if (isInstance(arrayView, Uint8Array)) {
+ const copy = new Uint8Array(arrayView)
+ return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)
+ }
+ return fromArrayLike(arrayView)
+}
+
+function fromArrayBuffer (array, byteOffset, length) {
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
+ throw new RangeError('"offset" is outside of buffer bounds')
+ }
+
+ if (array.byteLength < byteOffset + (length || 0)) {
+ throw new RangeError('"length" is outside of buffer bounds')
+ }
+
+ let buf
+ if (byteOffset === undefined && length === undefined) {
+ buf = new Uint8Array(array)
+ } else if (length === undefined) {
+ buf = new Uint8Array(array, byteOffset)
+ } else {
+ buf = new Uint8Array(array, byteOffset, length)
+ }
+
+ // Return an augmented `Uint8Array` instance
+ Object.setPrototypeOf(buf, Buffer.prototype)
+
+ return buf
+}
+
+function fromObject (obj) {
+ if (Buffer.isBuffer(obj)) {
+ const len = checked(obj.length) | 0
+ const 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
+
+ let x = a.length
+ let y = b.length
+
+ for (let 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)
+ }
+
+ let i
+ if (length === undefined) {
+ length = 0
+ for (i = 0; i < list.length; ++i) {
+ length += list[i].length
+ }
+ }
+
+ const buffer = Buffer.allocUnsafe(length)
+ let pos = 0
+ for (i = 0; i < list.length; ++i) {
+ let buf = list[i]
+ if (isInstance(buf, Uint8Array)) {
+ if (pos + buf.length > buffer.length) {
+ if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)
+ buf.copy(buffer, pos)
+ } else {
+ Uint8Array.prototype.set.call(
+ buffer,
+ buf,
+ pos
+ )
+ }
+ } else if (!Buffer.isBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ } else {
+ buf.copy(buffer, pos)
+ }
+ pos += buf.length
+ }
+ return buffer
+}
+
+function byteLength (string, encoding) {
+ if (Buffer.isBuffer(string)) {
+ return string.length
+ }
+ if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
+ return string.byteLength
+ }
+ if (typeof string !== 'string') {
+ throw new TypeError(
+ 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
+ 'Received type ' + typeof string
+ )
+ }
+
+ const len = string.length
+ const mustMatch = (arguments.length > 2 && arguments[2] === true)
+ if (!mustMatch && len === 0) return 0
+
+ // Use a for loop to avoid recursion
+ let 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) {
+ let loweredCase = false
+
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+ // property of a typed array.
+
+ // This behaves neither like String nor Uint8Array in that we set start/end
+ // to their upper/lower bounds if the value passed is out of range.
+ // undefined is handled specially as per ECMA-262 6th Edition,
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+ if (start === undefined || start < 0) {
+ start = 0
+ }
+ // Return early if start > this.length. Done here to prevent potential uint32
+ // coercion fail below.
+ if (start > this.length) {
+ return ''
+ }
+
+ if (end === undefined || end > this.length) {
+ end = this.length
+ }
+
+ if (end <= 0) {
+ return ''
+ }
+
+ // Force coercion to uint32. This will also coerce falsey/NaN values to 0.
+ end >>>= 0
+ start >>>= 0
+
+ if (end <= start) {
+ return ''
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end)
+
+ case 'ascii':
+ return asciiSlice(this, start, end)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Slice(this, start, end)
+
+ case 'base64':
+ return base64Slice(this, start, end)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = (encoding + '').toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
+// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
+// reliably in a browserify context because there could be multiple different
+// copies of the 'buffer' package in use. This method works even for Buffer
+// instances that were created from another copy of the `buffer` package.
+// See: https://github.com/feross/buffer/issues/154
+Buffer.prototype._isBuffer = true
+
+function swap (b, n, m) {
+ const i = b[n]
+ b[n] = b[m]
+ b[m] = i
+}
+
+Buffer.prototype.swap16 = function swap16 () {
+ const len = this.length
+ if (len % 2 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
+ }
+ for (let i = 0; i < len; i += 2) {
+ swap(this, i, i + 1)
+ }
+ return this
+}
+
+Buffer.prototype.swap32 = function swap32 () {
+ const len = this.length
+ if (len % 4 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
+ }
+ for (let i = 0; i < len; i += 4) {
+ swap(this, i, i + 3)
+ swap(this, i + 1, i + 2)
+ }
+ return this
+}
+
+Buffer.prototype.swap64 = function swap64 () {
+ const len = this.length
+ if (len % 8 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
+ }
+ for (let 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 () {
+ const 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 () {
+ let str = ''
+ const max = exports.INSPECT_MAX_BYTES
+ str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
+ if (this.length > max) str += ' ... '
+ return '<Buffer ' + str + '>'
+}
+if (customInspectSymbol) {
+ Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
+}
+
+Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+ if (isInstance(target, Uint8Array)) {
+ target = Buffer.from(target, target.offset, target.byteLength)
+ }
+ if (!Buffer.isBuffer(target)) {
+ throw new TypeError(
+ 'The "target" argument must be one of type Buffer or Uint8Array. ' +
+ 'Received type ' + (typeof target)
+ )
+ }
+
+ if (start === undefined) {
+ start = 0
+ }
+ if (end === undefined) {
+ end = target ? target.length : 0
+ }
+ if (thisStart === undefined) {
+ thisStart = 0
+ }
+ if (thisEnd === undefined) {
+ thisEnd = this.length
+ }
+
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+ throw new RangeError('out of range index')
+ }
+
+ if (thisStart >= thisEnd && start >= end) {
+ return 0
+ }
+ if (thisStart >= thisEnd) {
+ return -1
+ }
+ if (start >= end) {
+ return 1
+ }
+
+ start >>>= 0
+ end >>>= 0
+ thisStart >>>= 0
+ thisEnd >>>= 0
+
+ if (this === target) return 0
+
+ let x = thisEnd - thisStart
+ let y = end - start
+ const len = Math.min(x, y)
+
+ const thisCopy = this.slice(thisStart, thisEnd)
+ const targetCopy = target.slice(start, end)
+
+ for (let 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) {
+ let indexSize = 1
+ let arrLength = arr.length
+ let 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)
+ }
+ }
+
+ let i
+ if (dir) {
+ let 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--) {
+ let found = true
+ for (let 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
+ const remaining = buf.length - offset
+ if (!length) {
+ length = remaining
+ } else {
+ length = Number(length)
+ if (length > remaining) {
+ length = remaining
+ }
+ }
+
+ const strLen = string.length
+
+ if (length > strLen / 2) {
+ length = strLen / 2
+ }
+ let i
+ for (i = 0; i < length; ++i) {
+ const parsed = parseInt(string.substr(i * 2, 2), 16)
+ if (numberIsNaN(parsed)) return i
+ buf[offset + i] = parsed
+ }
+ return i
+}
+
+function utf8Write (buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8'
+ length = this.length
+ offset = 0
+ // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset
+ length = this.length
+ offset = 0
+ // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset >>> 0
+ if (isFinite(length)) {
+ length = length >>> 0
+ if (encoding === undefined) encoding = 'utf8'
+ } else {
+ encoding = length
+ length = undefined
+ }
+ } else {
+ throw new Error(
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+ )
+ }
+
+ const 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'
+
+ let loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length)
+
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ return asciiWrite(this, string, offset, length)
+
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ }
+}
+
+function base64Slice (buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return base64.fromByteArray(buf)
+ } else {
+ return base64.fromByteArray(buf.slice(start, end))
+ }
+}
+
+function utf8Slice (buf, start, end) {
+ end = Math.min(buf.length, end)
+ const res = []
+
+ let i = start
+ while (i < end) {
+ const firstByte = buf[i]
+ let codePoint = null
+ let bytesPerSequence = (firstByte > 0xEF)
+ ? 4
+ : (firstByte > 0xDF)
+ ? 3
+ : (firstByte > 0xBF)
+ ? 2
+ : 1
+
+ if (i + bytesPerSequence <= end) {
+ let 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
+const MAX_ARGUMENTS_LENGTH = 0x1000
+
+function decodeCodePointsArray (codePoints) {
+ const 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".
+ let res = ''
+ let i = 0
+ while (i < len) {
+ res += String.fromCharCode.apply(
+ String,
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
+ )
+ }
+ return res
+}
+
+function asciiSlice (buf, start, end) {
+ let ret = ''
+ end = Math.min(buf.length, end)
+
+ for (let i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i] & 0x7F)
+ }
+ return ret
+}
+
+function latin1Slice (buf, start, end) {
+ let ret = ''
+ end = Math.min(buf.length, end)
+
+ for (let i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i])
+ }
+ return ret
+}
+
+function hexSlice (buf, start, end) {
+ const len = buf.length
+
+ if (!start || start < 0) start = 0
+ if (!end || end < 0 || end > len) end = len
+
+ let out = ''
+ for (let i = start; i < end; ++i) {
+ out += hexSliceLookupTable[buf[i]]
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ const bytes = buf.slice(start, end)
+ let res = ''
+ // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
+ for (let i = 0; i < bytes.length - 1; i += 2) {
+ res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
+ }
+ return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+ const 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
+
+ const newBuf = this.subarray(start, end)
+ // Return an augmented `Uint8Array` instance
+ Object.setPrototypeOf(newBuf, Buffer.prototype)
+
+ return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUintLE =
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ let val = this[offset]
+ let mul = 1
+ let i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUintBE =
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length)
+ }
+
+ let val = this[offset + --byteLength]
+ let mul = 1
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUint8 =
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+Buffer.prototype.readUint16LE =
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUint16BE =
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUint32LE =
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return ((this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16)) +
+ (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUint32BE =
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] * 0x1000000) +
+ ((this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ this[offset + 3])
+}
+
+Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {
+ offset = offset >>> 0
+ validateNumber(offset, 'offset')
+ const first = this[offset]
+ const last = this[offset + 7]
+ if (first === undefined || last === undefined) {
+ boundsError(offset, this.length - 8)
+ }
+
+ const lo = first +
+ this[++offset] * 2 ** 8 +
+ this[++offset] * 2 ** 16 +
+ this[++offset] * 2 ** 24
+
+ const hi = this[++offset] +
+ this[++offset] * 2 ** 8 +
+ this[++offset] * 2 ** 16 +
+ last * 2 ** 24
+
+ return BigInt(lo) + (BigInt(hi) << BigInt(32))
+})
+
+Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {
+ offset = offset >>> 0
+ validateNumber(offset, 'offset')
+ const first = this[offset]
+ const last = this[offset + 7]
+ if (first === undefined || last === undefined) {
+ boundsError(offset, this.length - 8)
+ }
+
+ const hi = first * 2 ** 24 +
+ this[++offset] * 2 ** 16 +
+ this[++offset] * 2 ** 8 +
+ this[++offset]
+
+ const lo = this[++offset] * 2 ** 24 +
+ this[++offset] * 2 ** 16 +
+ this[++offset] * 2 ** 8 +
+ last
+
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo)
+})
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ let val = this[offset]
+ let mul = 1
+ let 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)
+
+ let i = byteLength
+ let mul = 1
+ let 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)
+ const 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)
+ const 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.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {
+ offset = offset >>> 0
+ validateNumber(offset, 'offset')
+ const first = this[offset]
+ const last = this[offset + 7]
+ if (first === undefined || last === undefined) {
+ boundsError(offset, this.length - 8)
+ }
+
+ const val = this[offset + 4] +
+ this[offset + 5] * 2 ** 8 +
+ this[offset + 6] * 2 ** 16 +
+ (last << 24) // Overflow
+
+ return (BigInt(val) << BigInt(32)) +
+ BigInt(first +
+ this[++offset] * 2 ** 8 +
+ this[++offset] * 2 ** 16 +
+ this[++offset] * 2 ** 24)
+})
+
+Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {
+ offset = offset >>> 0
+ validateNumber(offset, 'offset')
+ const first = this[offset]
+ const last = this[offset + 7]
+ if (first === undefined || last === undefined) {
+ boundsError(offset, this.length - 8)
+ }
+
+ const val = (first << 24) + // Overflow
+ this[++offset] * 2 ** 16 +
+ this[++offset] * 2 ** 8 +
+ this[++offset]
+
+ return (BigInt(val) << BigInt(32)) +
+ BigInt(this[++offset] * 2 ** 24 +
+ this[++offset] * 2 ** 16 +
+ this[++offset] * 2 ** 8 +
+ last)
+})
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+}
+
+Buffer.prototype.writeUintLE =
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) {
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ let mul = 1
+ let i = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUintBE =
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) {
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ let i = byteLength - 1
+ let mul = 1
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUint8 =
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+ this[offset] = (value & 0xff)
+ return offset + 1
+}
+
+Buffer.prototype.writeUint16LE =
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ return offset + 2
+}
+
+Buffer.prototype.writeUint16BE =
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ return offset + 2
+}
+
+Buffer.prototype.writeUint32LE =
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ this[offset + 3] = (value >>> 24)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 1] = (value >>> 8)
+ this[offset] = (value & 0xff)
+ return offset + 4
+}
+
+Buffer.prototype.writeUint32BE =
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ return offset + 4
+}
+
+function wrtBigUInt64LE (buf, value, offset, min, max) {
+ checkIntBI(value, min, max, buf, offset, 7)
+
+ let lo = Number(value & BigInt(0xffffffff))
+ buf[offset++] = lo
+ lo = lo >> 8
+ buf[offset++] = lo
+ lo = lo >> 8
+ buf[offset++] = lo
+ lo = lo >> 8
+ buf[offset++] = lo
+ let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))
+ buf[offset++] = hi
+ hi = hi >> 8
+ buf[offset++] = hi
+ hi = hi >> 8
+ buf[offset++] = hi
+ hi = hi >> 8
+ buf[offset++] = hi
+ return offset
+}
+
+function wrtBigUInt64BE (buf, value, offset, min, max) {
+ checkIntBI(value, min, max, buf, offset, 7)
+
+ let lo = Number(value & BigInt(0xffffffff))
+ buf[offset + 7] = lo
+ lo = lo >> 8
+ buf[offset + 6] = lo
+ lo = lo >> 8
+ buf[offset + 5] = lo
+ lo = lo >> 8
+ buf[offset + 4] = lo
+ let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))
+ buf[offset + 3] = hi
+ hi = hi >> 8
+ buf[offset + 2] = hi
+ hi = hi >> 8
+ buf[offset + 1] = hi
+ hi = hi >> 8
+ buf[offset] = hi
+ return offset + 8
+}
+
+Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {
+ return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))
+})
+
+Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {
+ return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))
+})
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) {
+ const limit = Math.pow(2, (8 * byteLength) - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ let i = 0
+ let mul = 1
+ let 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) {
+ const limit = Math.pow(2, (8 * byteLength) - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ let i = byteLength - 1
+ let mul = 1
+ let 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
+}
+
+Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {
+ return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))
+})
+
+Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {
+ return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))
+})
+
+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
+ }
+
+ const len = end - start
+
+ if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
+ // Use built-in when available, missing from IE11
+ this.copyWithin(targetStart, start, end)
+ } else {
+ Uint8Array.prototype.set.call(
+ target,
+ this.subarray(start, end),
+ targetStart
+ )
+ }
+
+ return len
+}
+
+// Usage:
+// buffer.fill(number[, offset[, end]])
+// buffer.fill(buffer[, offset[, end]])
+// buffer.fill(string[, offset[, end]][, encoding])
+Buffer.prototype.fill = function fill (val, start, end, encoding) {
+ // Handle string cases:
+ if (typeof val === 'string') {
+ if (typeof start === 'string') {
+ encoding = start
+ start = 0
+ end = this.length
+ } else if (typeof end === 'string') {
+ encoding = end
+ end = this.length
+ }
+ if (encoding !== undefined && typeof encoding !== 'string') {
+ throw new TypeError('encoding must be a string')
+ }
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+ if (val.length === 1) {
+ const code = val.charCodeAt(0)
+ if ((encoding === 'utf8' && code < 128) ||
+ encoding === 'latin1') {
+ // Fast path: If `val` fits into a single byte, use that numeric value.
+ val = code
+ }
+ }
+ } else if (typeof val === 'number') {
+ val = val & 255
+ } else if (typeof val === 'boolean') {
+ val = Number(val)
+ }
+
+ // Invalid ranges are not set to a default, so can range check early.
+ if (start < 0 || this.length < start || this.length < end) {
+ throw new RangeError('Out of range index')
+ }
+
+ if (end <= start) {
+ return this
+ }
+
+ start = start >>> 0
+ end = end === undefined ? this.length : end >>> 0
+
+ if (!val) val = 0
+
+ let i
+ if (typeof val === 'number') {
+ for (i = start; i < end; ++i) {
+ this[i] = val
+ }
+ } else {
+ const bytes = Buffer.isBuffer(val)
+ ? val
+ : Buffer.from(val, encoding)
+ const 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
+}
+
+// CUSTOM ERRORS
+// =============
+
+// Simplified versions from Node, changed for Buffer-only usage
+const errors = {}
+function E (sym, getMessage, Base) {
+ errors[sym] = class NodeError extends Base {
+ constructor () {
+ super()
+
+ Object.defineProperty(this, 'message', {
+ value: getMessage.apply(this, arguments),
+ writable: true,
+ configurable: true
+ })
+
+ // Add the error code to the name to include it in the stack trace.
+ this.name = `${this.name} [${sym}]`
+ // Access the stack to generate the error message including the error code
+ // from the name.
+ this.stack // eslint-disable-line no-unused-expressions
+ // Reset the name to the actual name.
+ delete this.name
+ }
+
+ get code () {
+ return sym
+ }
+
+ set code (value) {
+ Object.defineProperty(this, 'code', {
+ configurable: true,
+ enumerable: true,
+ value,
+ writable: true
+ })
+ }
+
+ toString () {
+ return `${this.name} [${sym}]: ${this.message}`
+ }
+ }
+}
+
+E('ERR_BUFFER_OUT_OF_BOUNDS',
+ function (name) {
+ if (name) {
+ return `${name} is outside of buffer bounds`
+ }
+
+ return 'Attempt to access memory outside buffer bounds'
+ }, RangeError)
+E('ERR_INVALID_ARG_TYPE',
+ function (name, actual) {
+ return `The "${name}" argument must be of type number. Received type ${typeof actual}`
+ }, TypeError)
+E('ERR_OUT_OF_RANGE',
+ function (str, range, input) {
+ let msg = `The value of "${str}" is out of range.`
+ let received = input
+ if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
+ received = addNumericalSeparator(String(input))
+ } else if (typeof input === 'bigint') {
+ received = String(input)
+ if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
+ received = addNumericalSeparator(received)
+ }
+ received += 'n'
+ }
+ msg += ` It must be ${range}. Received ${received}`
+ return msg
+ }, RangeError)
+
+function addNumericalSeparator (val) {
+ let res = ''
+ let i = val.length
+ const start = val[0] === '-' ? 1 : 0
+ for (; i >= start + 4; i -= 3) {
+ res = `_${val.slice(i - 3, i)}${res}`
+ }
+ return `${val.slice(0, i)}${res}`
+}
+
+// CHECK FUNCTIONS
+// ===============
+
+function checkBounds (buf, offset, byteLength) {
+ validateNumber(offset, 'offset')
+ if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
+ boundsError(offset, buf.length - (byteLength + 1))
+ }
+}
+
+function checkIntBI (value, min, max, buf, offset, byteLength) {
+ if (value > max || value < min) {
+ const n = typeof min === 'bigint' ? 'n' : ''
+ let range
+ if (byteLength > 3) {
+ if (min === 0 || min === BigInt(0)) {
+ range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`
+ } else {
+ range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +
+ `${(byteLength + 1) * 8 - 1}${n}`
+ }
+ } else {
+ range = `>= ${min}${n} and <= ${max}${n}`
+ }
+ throw new errors.ERR_OUT_OF_RANGE('value', range, value)
+ }
+ checkBounds(buf, offset, byteLength)
+}
+
+function validateNumber (value, name) {
+ if (typeof value !== 'number') {
+ throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)
+ }
+}
+
+function boundsError (value, length, type) {
+ if (Math.floor(value) !== value) {
+ validateNumber(value, type)
+ throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)
+ }
+
+ if (length < 0) {
+ throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()
+ }
+
+ throw new errors.ERR_OUT_OF_RANGE(type || 'offset',
+ `>= ${type ? 1 : 0} and <= ${length}`,
+ value)
+}
+
+// HELPER FUNCTIONS
+// ================
+
+const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
+
+function base64clean (str) {
+ // Node takes equal signs as end of the Base64 encoding
+ str = str.split('=')[0]
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = str.trim().replace(INVALID_BASE64_RE, '')
+ // Node converts strings with length < 2 to ''
+ if (str.length < 2) return ''
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '='
+ }
+ return str
+}
+
+function utf8ToBytes (string, units) {
+ units = units || Infinity
+ let codePoint
+ const length = string.length
+ let leadSurrogate = null
+ const bytes = []
+
+ for (let 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) {
+ const byteArray = []
+ for (let 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) {
+ let c, hi, lo
+ const byteArray = []
+ for (let 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) {
+ let i
+ for (i = 0; i < length; ++i) {
+ if ((i + offset >= dst.length) || (i >= src.length)) break
+ dst[i + offset] = src[i]
+ }
+ return i
+}
+
+// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
+// the `instanceof` check but they should be treated as of that type.
+// See: https://github.com/feross/buffer/issues/166
+function isInstance (obj, type) {
+ return obj instanceof type ||
+ (obj != null && obj.constructor != null && obj.constructor.name != null &&
+ obj.constructor.name === type.name)
+}
+function numberIsNaN (obj) {
+ // For IE11 support
+ return obj !== obj // eslint-disable-line no-self-compare
+}
+
+// Create lookup table for `toString('hex')`
+// See: https://github.com/feross/buffer/issues/219
+const hexSliceLookupTable = (function () {
+ const alphabet = '0123456789abcdef'
+ const table = new Array(256)
+ for (let i = 0; i < 16; ++i) {
+ const i16 = i * 16
+ for (let j = 0; j < 16; ++j) {
+ table[i16 + j] = alphabet[i] + alphabet[j]
+ }
+ }
+ return table
+})()
+
+// Return not function with Error if BigInt not supported
+function defineBigIntMethod (fn) {
+ return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn
+}
+
+function BufferBigIntNotDefined () {
+ throw new Error('BigInt not supported')
+}
diff --git a/node_modules/buffer/package.json b/node_modules/buffer/package.json
new file mode 100644
index 0000000..ca1ad9a
--- /dev/null
+++ b/node_modules/buffer/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "buffer",
+ "description": "Node.js Buffer API, for the browser",
+ "version": "6.0.3",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "https://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/buffer/issues"
+ },
+ "contributors": [
+ "Romain Beauxis <toots@rastageeks.org>",
+ "James Halliday <mail@substack.net>"
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ },
+ "devDependencies": {
+ "airtap": "^3.0.0",
+ "benchmark": "^2.1.4",
+ "browserify": "^17.0.0",
+ "concat-stream": "^2.0.0",
+ "hyperquest": "^2.1.3",
+ "is-buffer": "^2.0.5",
+ "is-nan": "^1.3.0",
+ "split": "^1.0.1",
+ "standard": "*",
+ "tape": "^5.0.1",
+ "through2": "^4.0.2",
+ "uglify-js": "^3.11.5"
+ },
+ "homepage": "https://github.com/feross/buffer",
+ "jspm": {
+ "map": {
+ "./index.js": {
+ "node": "@node/buffer"
+ }
+ }
+ },
+ "keywords": [
+ "arraybuffer",
+ "browser",
+ "browserify",
+ "buffer",
+ "compatible",
+ "dataview",
+ "uint8array"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/buffer.git"
+ },
+ "scripts": {
+ "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html",
+ "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js",
+ "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c",
+ "test": "standard && node ./bin/test.js",
+ "test-browser-old": "airtap -- test/*.js",
+ "test-browser-old-local": "airtap --local -- test/*.js",
+ "test-browser-new": "airtap -- test/*.js test/node/*.js",
+ "test-browser-new-local": "airtap --local -- test/*.js test/node/*.js",
+ "test-node": "tape test/*.js test/node/*.js",
+ "update-authors": "./bin/update-authors.sh"
+ },
+ "standard": {
+ "ignore": [
+ "test/node/**/*.js",
+ "test/common.js",
+ "test/_polyfill.js",
+ "perf/**/*.js"
+ ]
+ },
+ "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/chalk/index.d.ts b/node_modules/chalk/index.d.ts
new file mode 100644
index 0000000..9cd88f3
--- /dev/null
+++ b/node_modules/chalk/index.d.ts
@@ -0,0 +1,415 @@
+/**
+Basic foreground colors.
+
+[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
+*/
+declare type ForegroundColor =
+ | 'black'
+ | 'red'
+ | 'green'
+ | 'yellow'
+ | 'blue'
+ | 'magenta'
+ | 'cyan'
+ | 'white'
+ | 'gray'
+ | 'grey'
+ | 'blackBright'
+ | 'redBright'
+ | 'greenBright'
+ | 'yellowBright'
+ | 'blueBright'
+ | 'magentaBright'
+ | 'cyanBright'
+ | 'whiteBright';
+
+/**
+Basic background colors.
+
+[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
+*/
+declare type BackgroundColor =
+ | 'bgBlack'
+ | 'bgRed'
+ | 'bgGreen'
+ | 'bgYellow'
+ | 'bgBlue'
+ | 'bgMagenta'
+ | 'bgCyan'
+ | 'bgWhite'
+ | 'bgGray'
+ | 'bgGrey'
+ | 'bgBlackBright'
+ | 'bgRedBright'
+ | 'bgGreenBright'
+ | 'bgYellowBright'
+ | 'bgBlueBright'
+ | 'bgMagentaBright'
+ | 'bgCyanBright'
+ | 'bgWhiteBright';
+
+/**
+Basic colors.
+
+[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
+*/
+declare type Color = ForegroundColor | BackgroundColor;
+
+declare type Modifiers =
+ | 'reset'
+ | 'bold'
+ | 'dim'
+ | 'italic'
+ | 'underline'
+ | 'inverse'
+ | 'hidden'
+ | 'strikethrough'
+ | 'visible';
+
+declare namespace chalk {
+ /**
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ type Level = 0 | 1 | 2 | 3;
+
+ interface Options {
+ /**
+ Specify the color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ level?: Level;
+ }
+
+ /**
+ Return a new Chalk instance.
+ */
+ type Instance = new (options?: Options) => Chalk;
+
+ /**
+ Detect whether the terminal supports color.
+ */
+ interface ColorSupport {
+ /**
+ The color level used by Chalk.
+ */
+ level: Level;
+
+ /**
+ Return whether Chalk supports basic 16 colors.
+ */
+ hasBasic: boolean;
+
+ /**
+ Return whether Chalk supports ANSI 256 colors.
+ */
+ has256: boolean;
+
+ /**
+ Return whether Chalk supports Truecolor 16 million colors.
+ */
+ has16m: boolean;
+ }
+
+ interface ChalkFunction {
+ /**
+ Use a template string.
+
+ @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ log(chalk`
+ CPU: {red ${cpu.totalPercent}%}
+ RAM: {green ${ram.used / ram.total * 100}%}
+ DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
+ `);
+ ```
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`)
+ ```
+ */
+ (text: TemplateStringsArray, ...placeholders: unknown[]): string;
+
+ (...text: unknown[]): string;
+ }
+
+ interface Chalk extends ChalkFunction {
+ /**
+ Return a new Chalk instance.
+ */
+ Instance: Instance;
+
+ /**
+ The color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ level: Level;
+
+ /**
+ Use HEX value to set text color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.hex('#DEADED');
+ ```
+ */
+ hex(color: string): Chalk;
+
+ /**
+ Use keyword color value to set text color.
+
+ @param color - Keyword value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.keyword('orange');
+ ```
+ */
+ keyword(color: string): Chalk;
+
+ /**
+ Use RGB values to set text color.
+ */
+ rgb(red: number, green: number, blue: number): Chalk;
+
+ /**
+ Use HSL values to set text color.
+ */
+ hsl(hue: number, saturation: number, lightness: number): Chalk;
+
+ /**
+ Use HSV values to set text color.
+ */
+ hsv(hue: number, saturation: number, value: number): Chalk;
+
+ /**
+ Use HWB values to set text color.
+ */
+ hwb(hue: number, whiteness: number, blackness: number): Chalk;
+
+ /**
+ Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color.
+
+ 30 <= code && code < 38 || 90 <= code && code < 98
+ For example, 31 for red, 91 for redBright.
+ */
+ ansi(code: number): Chalk;
+
+ /**
+ Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
+ */
+ ansi256(index: number): Chalk;
+
+ /**
+ Use HEX value to set background color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.bgHex('#DEADED');
+ ```
+ */
+ bgHex(color: string): Chalk;
+
+ /**
+ Use keyword color value to set background color.
+
+ @param color - Keyword value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.bgKeyword('orange');
+ ```
+ */
+ bgKeyword(color: string): Chalk;
+
+ /**
+ Use RGB values to set background color.
+ */
+ bgRgb(red: number, green: number, blue: number): Chalk;
+
+ /**
+ Use HSL values to set background color.
+ */
+ bgHsl(hue: number, saturation: number, lightness: number): Chalk;
+
+ /**
+ Use HSV values to set background color.
+ */
+ bgHsv(hue: number, saturation: number, value: number): Chalk;
+
+ /**
+ Use HWB values to set background color.
+ */
+ bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
+
+ /**
+ Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color.
+
+ 30 <= code && code < 38 || 90 <= code && code < 98
+ For example, 31 for red, 91 for redBright.
+ Use the foreground code, not the background code (for example, not 41, nor 101).
+ */
+ bgAnsi(code: number): Chalk;
+
+ /**
+ Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
+ */
+ bgAnsi256(index: number): Chalk;
+
+ /**
+ Modifier: Resets the current color chain.
+ */
+ readonly reset: Chalk;
+
+ /**
+ Modifier: Make text bold.
+ */
+ readonly bold: Chalk;
+
+ /**
+ Modifier: Emitting only a small amount of light.
+ */
+ readonly dim: Chalk;
+
+ /**
+ Modifier: Make text italic. (Not widely supported)
+ */
+ readonly italic: Chalk;
+
+ /**
+ Modifier: Make text underline. (Not widely supported)
+ */
+ readonly underline: Chalk;
+
+ /**
+ Modifier: Inverse background and foreground colors.
+ */
+ readonly inverse: Chalk;
+
+ /**
+ Modifier: Prints the text, but makes it invisible.
+ */
+ readonly hidden: Chalk;
+
+ /**
+ Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
+ */
+ readonly strikethrough: Chalk;
+
+ /**
+ Modifier: Prints the text only when Chalk has a color support level > 0.
+ Can be useful for things that are purely cosmetic.
+ */
+ readonly visible: Chalk;
+
+ readonly black: Chalk;
+ readonly red: Chalk;
+ readonly green: Chalk;
+ readonly yellow: Chalk;
+ readonly blue: Chalk;
+ readonly magenta: Chalk;
+ readonly cyan: Chalk;
+ readonly white: Chalk;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly gray: Chalk;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly grey: Chalk;
+
+ readonly blackBright: Chalk;
+ readonly redBright: Chalk;
+ readonly greenBright: Chalk;
+ readonly yellowBright: Chalk;
+ readonly blueBright: Chalk;
+ readonly magentaBright: Chalk;
+ readonly cyanBright: Chalk;
+ readonly whiteBright: Chalk;
+
+ readonly bgBlack: Chalk;
+ readonly bgRed: Chalk;
+ readonly bgGreen: Chalk;
+ readonly bgYellow: Chalk;
+ readonly bgBlue: Chalk;
+ readonly bgMagenta: Chalk;
+ readonly bgCyan: Chalk;
+ readonly bgWhite: Chalk;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: Chalk;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: Chalk;
+
+ readonly bgBlackBright: Chalk;
+ readonly bgRedBright: Chalk;
+ readonly bgGreenBright: Chalk;
+ readonly bgYellowBright: Chalk;
+ readonly bgBlueBright: Chalk;
+ readonly bgMagentaBright: Chalk;
+ readonly bgCyanBright: Chalk;
+ readonly bgWhiteBright: Chalk;
+ }
+}
+
+/**
+Main Chalk object that allows to chain styles together.
+Call the last one as a method with a string argument.
+Order doesn't matter, and later styles take precedent in case of a conflict.
+This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+*/
+declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
+ supportsColor: chalk.ColorSupport | false;
+ Level: chalk.Level;
+ Color: Color;
+ ForegroundColor: ForegroundColor;
+ BackgroundColor: BackgroundColor;
+ Modifiers: Modifiers;
+ stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false};
+};
+
+export = chalk;
diff --git a/node_modules/chalk/license b/node_modules/chalk/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/chalk/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/chalk/package.json b/node_modules/chalk/package.json
new file mode 100644
index 0000000..47c23f2
--- /dev/null
+++ b/node_modules/chalk/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "chalk",
+ "version": "4.1.2",
+ "description": "Terminal string styling done right",
+ "license": "MIT",
+ "repository": "chalk/chalk",
+ "funding": "https://github.com/chalk/chalk?sponsor=1",
+ "main": "source",
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && nyc ava && tsd",
+ "bench": "matcha benchmark.js"
+ },
+ "files": [
+ "source",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "str",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "coveralls": "^3.0.7",
+ "execa": "^4.0.0",
+ "import-fresh": "^3.1.0",
+ "matcha": "^0.7.0",
+ "nyc": "^15.0.0",
+ "resolve-from": "^5.0.0",
+ "tsd": "^0.7.4",
+ "xo": "^0.28.2"
+ },
+ "xo": {
+ "rules": {
+ "unicorn/prefer-string-slice": "off",
+ "unicorn/prefer-includes": "off",
+ "@typescript-eslint/member-ordering": "off",
+ "no-redeclare": "off",
+ "unicorn/string-content": "off",
+ "unicorn/better-regex": "off"
+ }
+ }
+}
diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md
new file mode 100644
index 0000000..a055d21
--- /dev/null
+++ b/node_modules/chalk/readme.md
@@ -0,0 +1,341 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="320" src="media/logo.svg" alt="Chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) [![run on repl.it](https://repl.it/badge/github/chalk/chalk)](https://repl.it/github/chalk/chalk)
+
+<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
+
+<br>
+
+---
+
+<div align="center">
+ <p>
+ <p>
+ <sup>
+ Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a> and <a href="https://stakes.social/0x44d871aebF0126Bf646753E2C976Aa7e68A66c15">Dev</a>
+ </sup>
+ </p>
+ <sup>Special thanks to:</sup>
+ <br>
+ <br>
+ <a href="https://standardresume.co/tech">
+ <img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160"/>
+ </a>
+ <br>
+ <br>
+ <a href="https://retool.com/?utm_campaign=sindresorhus">
+ <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230"/>
+ </a>
+ <br>
+ <br>
+ <a href="https://doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=chalk&utm_source=github">
+ <div>
+ <img src="https://dashboard.doppler.com/imgs/logo-long.svg" width="240" alt="Doppler">
+ </div>
+ <b>All your environment variables, in one place</b>
+ <div>
+ <span>Stop struggling with scattered API keys, hacking together home-brewed tools,</span>
+ <br>
+ <span>and avoiding access controls. Keep your team and servers in sync with Doppler.</span>
+ </div>
+ </a>
+ <br>
+ <a href="https://uibakery.io/?utm_source=chalk&utm_medium=sponsor&utm_campaign=github">
+ <div>
+ <img src="https://sindresorhus.com/assets/thanks/uibakery-logo.jpg" width="270" alt="UI Bakery">
+ </div>
+ </a>
+ </p>
+</div>
+
+---
+
+<br>
+
+## Highlights
+
+- Expressive API
+- Highly performant
+- Ability to nest styles
+- [256/Truecolor color support](#256-and-truecolor-color-support)
+- Auto-detects color support
+- Doesn't extend `String.prototype`
+- Clean and focused
+- Actively maintained
+- [Used by ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020
+
+## Install
+
+```console
+$ npm install chalk
+```
+
+## Usage
+
+```js
+const chalk = require('chalk');
+
+console.log(chalk.blue('Hello world!'));
+```
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+const chalk = require('chalk');
+const log = console.log;
+
+// Combine styled and normal strings
+log(chalk.blue('Hello') + ' World' + chalk.red('!'));
+
+// Compose multiple styles using the chainable API
+log(chalk.blue.bgRed.bold('Hello world!'));
+
+// Pass in multiple arguments
+log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
+
+// Nest styles
+log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
+
+// Nest styles of the same type even (color, underline, background)
+log(chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+));
+
+// ES2015 template literal
+log(`
+CPU: ${chalk.red('90%')}
+RAM: ${chalk.green('40%')}
+DISK: ${chalk.yellow('70%')}
+`);
+
+// ES2015 tagged template literal
+log(chalk`
+CPU: {red ${cpu.totalPercent}%}
+RAM: {green ${ram.used / ram.total * 100}%}
+DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
+`);
+
+// Use RGB colors in terminal emulators that support it.
+log(chalk.keyword('orange')('Yay for orange colored text!'));
+log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
+log(chalk.hex('#DEADED').bold('Bold gray!'));
+```
+
+Easily define your own themes:
+
+```js
+const chalk = require('chalk');
+
+const error = chalk.bold.red;
+const warning = chalk.keyword('orange');
+
+console.log(error('Error!'));
+console.log(warning('Warning!'));
+```
+
+Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
+
+```js
+const name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> 'Hello Sindre'
+```
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.level
+
+Specifies the level of color support.
+
+Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+const ctx = new chalk.Instance({level: 0});
+```
+
+| Level | Description |
+| :---: | :--- |
+| `0` | All colors disabled |
+| `1` | Basic color support (16 colors) |
+| `2` | 256 color support |
+| `3` | Truecolor support (16 million colors) |
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+### chalk.stderr and chalk.stderr.supportsColor
+
+`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience.
+
+## Styles
+
+### Modifiers
+
+- `reset` - Resets the current color chain.
+- `bold` - Make text bold.
+- `dim` - Emitting only a small amount of light.
+- `italic` - Make text italic. *(Not widely supported)*
+- `underline` - Make text underline. *(Not widely supported)*
+- `inverse`- Inverse background and foreground colors.
+- `hidden` - Prints the text, but makes it invisible.
+- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
+- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `blackBright` (alias: `gray`, `grey`)
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+## Tagged template literal
+
+Chalk can be used as a [tagged template literal](https://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
+
+```js
+const chalk = require('chalk');
+
+const miles = 18;
+const calculateFeet = miles => miles * 5280;
+
+console.log(chalk`
+ There are {bold 5280 feet} in a mile.
+ In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
+`);
+```
+
+Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
+
+Template styles are chained exactly like normal Chalk styles. The following three statements are equivalent:
+
+```js
+console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
+console.log(chalk.bold.rgb(10, 100, 200)`Hello!`);
+console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
+```
+
+Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
+
+All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
+
+## 256 and Truecolor color support
+
+Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
+
+Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
+
+Examples:
+
+- `chalk.hex('#DEADED').underline('Hello, world!')`
+- `chalk.keyword('orange')('Some orange text')`
+- `chalk.rgb(15, 100, 204).inverse('Hello!')`
+
+Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
+
+- `chalk.bgHex('#DEADED').underline('Hello, world!')`
+- `chalk.bgKeyword('orange')('Some orange text')`
+- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
+
+The following color models can be used:
+
+- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
+- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
+- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
+- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
+- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
+- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
+- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')`
+- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
+
+## Origin story
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
+
+## chalk for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of chalk 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-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## Related
+
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
+- [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
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
+- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
+- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
+- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
+- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
diff --git a/node_modules/chalk/source/index.js b/node_modules/chalk/source/index.js
new file mode 100644
index 0000000..75ec663
--- /dev/null
+++ b/node_modules/chalk/source/index.js
@@ -0,0 +1,229 @@
+'use strict';
+const ansiStyles = require('ansi-styles');
+const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');
+const {
+ stringReplaceAll,
+ stringEncaseCRLFWithFirstIndex
+} = require('./util');
+
+const {isArray} = Array;
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = [
+ 'ansi',
+ 'ansi',
+ 'ansi256',
+ 'ansi16m'
+];
+
+const styles = Object.create(null);
+
+const applyOptions = (object, options = {}) => {
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
+ throw new Error('The `level` option should be an integer from 0 to 3');
+ }
+
+ // Detect level if not set manually
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
+ object.level = options.level === undefined ? colorLevel : options.level;
+};
+
+class ChalkClass {
+ constructor(options) {
+ // eslint-disable-next-line no-constructor-return
+ return chalkFactory(options);
+ }
+}
+
+const chalkFactory = options => {
+ const chalk = {};
+ applyOptions(chalk, options);
+
+ chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
+
+ Object.setPrototypeOf(chalk, Chalk.prototype);
+ Object.setPrototypeOf(chalk.template, chalk);
+
+ chalk.template.constructor = () => {
+ throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
+ };
+
+ chalk.template.Instance = ChalkClass;
+
+ return chalk.template;
+};
+
+function Chalk(options) {
+ return chalkFactory(options);
+}
+
+for (const [styleName, style] of Object.entries(ansiStyles)) {
+ styles[styleName] = {
+ get() {
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
+ Object.defineProperty(this, styleName, {value: builder});
+ return builder;
+ }
+ };
+}
+
+styles.visible = {
+ get() {
+ const builder = createBuilder(this, this._styler, true);
+ Object.defineProperty(this, 'visible', {value: builder});
+ return builder;
+ }
+};
+
+const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
+
+for (const model of usedModels) {
+ styles[model] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
+ return createBuilder(this, styler, this._isEmpty);
+ };
+ }
+ };
+}
+
+for (const model of usedModels) {
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
+ return createBuilder(this, styler, this._isEmpty);
+ };
+ }
+ };
+}
+
+const proto = Object.defineProperties(() => {}, {
+ ...styles,
+ level: {
+ enumerable: true,
+ get() {
+ return this._generator.level;
+ },
+ set(level) {
+ this._generator.level = level;
+ }
+ }
+});
+
+const createStyler = (open, close, parent) => {
+ let openAll;
+ let closeAll;
+ if (parent === undefined) {
+ openAll = open;
+ closeAll = close;
+ } else {
+ openAll = parent.openAll + open;
+ closeAll = close + parent.closeAll;
+ }
+
+ return {
+ open,
+ close,
+ openAll,
+ closeAll,
+ parent
+ };
+};
+
+const createBuilder = (self, _styler, _isEmpty) => {
+ const builder = (...arguments_) => {
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
+ // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
+ }
+
+ // Single argument is hot path, implicit coercion is faster than anything
+ // eslint-disable-next-line no-implicit-coercion
+ return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
+ };
+
+ // We alter the prototype because we must return a function, but there is
+ // no way to create a function with a different prototype
+ Object.setPrototypeOf(builder, proto);
+
+ builder._generator = self;
+ builder._styler = _styler;
+ builder._isEmpty = _isEmpty;
+
+ return builder;
+};
+
+const applyStyle = (self, string) => {
+ if (self.level <= 0 || !string) {
+ return self._isEmpty ? '' : string;
+ }
+
+ let styler = self._styler;
+
+ if (styler === undefined) {
+ return string;
+ }
+
+ const {openAll, closeAll} = styler;
+ if (string.indexOf('\u001B') !== -1) {
+ while (styler !== undefined) {
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ string = stringReplaceAll(string, styler.close, styler.open);
+
+ styler = styler.parent;
+ }
+ }
+
+ // We can move both next actions out of loop, because remaining actions in loop won't have
+ // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
+ const lfIndex = string.indexOf('\n');
+ if (lfIndex !== -1) {
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
+ }
+
+ return openAll + string + closeAll;
+};
+
+let template;
+const chalkTag = (chalk, ...strings) => {
+ const [firstString] = strings;
+
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
+ // If chalk() was called by itself or with a string,
+ // return the string itself as a string.
+ return strings.join(' ');
+ }
+
+ const arguments_ = strings.slice(1);
+ const parts = [firstString.raw[0]];
+
+ for (let i = 1; i < firstString.length; i++) {
+ parts.push(
+ String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
+ String(firstString.raw[i])
+ );
+ }
+
+ if (template === undefined) {
+ template = require('./templates');
+ }
+
+ return template(chalk, parts.join(''));
+};
+
+Object.defineProperties(Chalk.prototype, styles);
+
+const chalk = Chalk(); // eslint-disable-line new-cap
+chalk.supportsColor = stdoutColor;
+chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
+chalk.stderr.supportsColor = stderrColor;
+
+module.exports = chalk;
diff --git a/node_modules/chalk/source/templates.js b/node_modules/chalk/source/templates.js
new file mode 100644
index 0000000..b130949
--- /dev/null
+++ b/node_modules/chalk/source/templates.js
@@ -0,0 +1,134 @@
+'use strict';
+const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
+const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
+const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
+const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
+
+const ESCAPES = new Map([
+ ['n', '\n'],
+ ['r', '\r'],
+ ['t', '\t'],
+ ['b', '\b'],
+ ['f', '\f'],
+ ['v', '\v'],
+ ['0', '\0'],
+ ['\\', '\\'],
+ ['e', '\u001B'],
+ ['a', '\u0007']
+]);
+
+function unescape(c) {
+ const u = c[0] === 'u';
+ const bracket = c[1] === '{';
+
+ if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
+ return String.fromCharCode(parseInt(c.slice(1), 16));
+ }
+
+ if (u && bracket) {
+ return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
+ }
+
+ return ESCAPES.get(c) || c;
+}
+
+function parseArguments(name, arguments_) {
+ const results = [];
+ const chunks = arguments_.trim().split(/\s*,\s*/g);
+ let matches;
+
+ for (const chunk of chunks) {
+ const number = Number(chunk);
+ if (!Number.isNaN(number)) {
+ results.push(number);
+ } else if ((matches = chunk.match(STRING_REGEX))) {
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
+ } else {
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
+ }
+ }
+
+ return results;
+}
+
+function parseStyle(style) {
+ STYLE_REGEX.lastIndex = 0;
+
+ const results = [];
+ let matches;
+
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
+ const name = matches[1];
+
+ if (matches[2]) {
+ const args = parseArguments(name, matches[2]);
+ results.push([name].concat(args));
+ } else {
+ results.push([name]);
+ }
+ }
+
+ return results;
+}
+
+function buildStyle(chalk, styles) {
+ const enabled = {};
+
+ for (const layer of styles) {
+ for (const style of layer.styles) {
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
+ }
+ }
+
+ let current = chalk;
+ for (const [styleName, styles] of Object.entries(enabled)) {
+ if (!Array.isArray(styles)) {
+ continue;
+ }
+
+ if (!(styleName in current)) {
+ throw new Error(`Unknown Chalk style: ${styleName}`);
+ }
+
+ current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
+ }
+
+ return current;
+}
+
+module.exports = (chalk, temporary) => {
+ const styles = [];
+ const chunks = [];
+ let chunk = [];
+
+ // eslint-disable-next-line max-params
+ temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
+ if (escapeCharacter) {
+ chunk.push(unescape(escapeCharacter));
+ } else if (style) {
+ const string = chunk.join('');
+ chunk = [];
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
+ styles.push({inverse, styles: parseStyle(style)});
+ } else if (close) {
+ if (styles.length === 0) {
+ throw new Error('Found extraneous } in Chalk template literal');
+ }
+
+ chunks.push(buildStyle(chalk, styles)(chunk.join('')));
+ chunk = [];
+ styles.pop();
+ } else {
+ chunk.push(character);
+ }
+ });
+
+ chunks.push(chunk.join(''));
+
+ if (styles.length > 0) {
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
+ throw new Error(errMessage);
+ }
+
+ return chunks.join('');
+};
diff --git a/node_modules/chalk/source/util.js b/node_modules/chalk/source/util.js
new file mode 100644
index 0000000..ca466fd
--- /dev/null
+++ b/node_modules/chalk/source/util.js
@@ -0,0 +1,39 @@
+'use strict';
+
+const stringReplaceAll = (string, substring, replacer) => {
+ let index = string.indexOf(substring);
+ if (index === -1) {
+ return string;
+ }
+
+ const substringLength = substring.length;
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
+ endIndex = index + substringLength;
+ index = string.indexOf(substring, endIndex);
+ } while (index !== -1);
+
+ returnValue += string.substr(endIndex);
+ return returnValue;
+};
+
+const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ const gotCR = string[index - 1] === '\r';
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
+ endIndex = index + 1;
+ index = string.indexOf('\n', endIndex);
+ } while (index !== -1);
+
+ returnValue += string.substr(endIndex);
+ return returnValue;
+};
+
+module.exports = {
+ stringReplaceAll,
+ stringEncaseCRLFWithFirstIndex
+};
diff --git a/node_modules/cli-cursor/index.d.ts b/node_modules/cli-cursor/index.d.ts
new file mode 100644
index 0000000..bfd4f63
--- /dev/null
+++ b/node_modules/cli-cursor/index.d.ts
@@ -0,0 +1,47 @@
+declare const cliCursor: {
+ /**
+ Show cursor.
+
+ @param stream - Default: `process.stderr`.
+
+ @example
+ ```
+ import cliCursor from 'cli-cursor';
+
+ cliCursor.show();
+ ```
+ */
+ show(stream?: NodeJS.WritableStream): void;
+
+ /**
+ Hide cursor.
+
+ @param stream - Default: `process.stderr`.
+
+ @example
+ ```
+ import cliCursor from 'cli-cursor';
+
+ cliCursor.hide();
+ ```
+ */
+ hide(stream?: NodeJS.WritableStream): void;
+
+ /**
+ Toggle cursor visibility.
+
+ @param force - Is useful to show or hide the cursor based on a boolean.
+ @param stream - Default: `process.stderr`.
+
+ @example
+ ```
+ import cliCursor from 'cli-cursor';
+
+ const unicornsAreAwesome = true;
+ cliCursor.toggle(unicornsAreAwesome);
+ ```
+ */
+ toggle(force?: boolean, stream?: NodeJS.WritableStream): void;
+};
+
+export default cliCursor;
diff --git a/node_modules/cli-cursor/index.js b/node_modules/cli-cursor/index.js
new file mode 100644
index 0000000..8435813
--- /dev/null
+++ b/node_modules/cli-cursor/index.js
@@ -0,0 +1,39 @@
+import process from 'node:process';
+import restoreCursor from 'restore-cursor';
+
+let isHidden = false;
+
+const cliCursor = {};
+
+cliCursor.show = (writableStream = process.stderr) => {
+ if (!writableStream.isTTY) {
+ return;
+ }
+
+ isHidden = false;
+ writableStream.write('\u001B[?25h');
+};
+
+cliCursor.hide = (writableStream = process.stderr) => {
+ if (!writableStream.isTTY) {
+ return;
+ }
+
+ restoreCursor();
+ isHidden = true;
+ writableStream.write('\u001B[?25l');
+};
+
+cliCursor.toggle = (force, writableStream) => {
+ if (force !== undefined) {
+ isHidden = force;
+ }
+
+ if (isHidden) {
+ cliCursor.show(writableStream);
+ } else {
+ cliCursor.hide(writableStream);
+ }
+};
+
+export default cliCursor;
diff --git a/node_modules/cli-cursor/license b/node_modules/cli-cursor/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/cli-cursor/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/cli-cursor/package.json b/node_modules/cli-cursor/package.json
new file mode 100644
index 0000000..4ae8153
--- /dev/null
+++ b/node_modules/cli-cursor/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "cli-cursor",
+ "version": "4.0.0",
+ "description": "Toggle the CLI cursor",
+ "license": "MIT",
+ "repository": "sindresorhus/cli-cursor",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "cli",
+ "cursor",
+ "ansi",
+ "toggle",
+ "display",
+ "show",
+ "hide",
+ "term",
+ "terminal",
+ "console",
+ "tty",
+ "shell",
+ "command-line"
+ ],
+ "dependencies": {
+ "restore-cursor": "^4.0.0"
+ },
+ "devDependencies": {
+ "@types/node": "^16.7.1",
+ "ava": "^3.15.0",
+ "tsd": "^0.17.0",
+ "xo": "^0.44.0"
+ }
+}
diff --git a/node_modules/cli-cursor/readme.md b/node_modules/cli-cursor/readme.md
new file mode 100644
index 0000000..addfea8
--- /dev/null
+++ b/node_modules/cli-cursor/readme.md
@@ -0,0 +1,51 @@
+# cli-cursor
+
+> Toggle the CLI cursor
+
+The cursor is [gracefully restored](https://github.com/sindresorhus/restore-cursor) if the process exits.
+
+## Install
+
+```
+$ npm install cli-cursor
+```
+
+## Usage
+
+```js
+import cliCursor from 'cli-cursor';
+
+cliCursor.hide();
+
+const unicornsAreAwesome = true;
+cliCursor.toggle(unicornsAreAwesome);
+```
+
+## API
+
+### .show(stream?)
+
+### .hide(stream?)
+
+### .toggle(force?, stream?)
+
+#### force
+
+Useful for showing or hiding the cursor based on a boolean.
+
+#### stream
+
+Type: `stream.Writable`\
+Default: `process.stderr`
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-cli-cursor?utm_source=npm-cli-cursor&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/cli-spinners/index.d.ts b/node_modules/cli-spinners/index.d.ts
new file mode 100644
index 0000000..7247ba8
--- /dev/null
+++ b/node_modules/cli-spinners/index.d.ts
@@ -0,0 +1,125 @@
+declare namespace cliSpinners {
+ type SpinnerName =
+ | 'dots'
+ | 'dots2'
+ | 'dots3'
+ | 'dots4'
+ | 'dots5'
+ | 'dots6'
+ | 'dots7'
+ | 'dots8'
+ | 'dots9'
+ | 'dots10'
+ | 'dots11'
+ | 'dots12'
+ | 'dots8Bit'
+ | 'line'
+ | 'line2'
+ | 'pipe'
+ | 'simpleDots'
+ | 'simpleDotsScrolling'
+ | 'star'
+ | 'star2'
+ | 'flip'
+ | 'hamburger'
+ | 'growVertical'
+ | 'growHorizontal'
+ | 'balloon'
+ | 'balloon2'
+ | 'noise'
+ | 'bounce'
+ | 'boxBounce'
+ | 'boxBounce2'
+ | 'triangle'
+ | 'arc'
+ | 'circle'
+ | 'squareCorners'
+ | 'circleQuarters'
+ | 'circleHalves'
+ | 'squish'
+ | 'toggle'
+ | 'toggle2'
+ | 'toggle3'
+ | 'toggle4'
+ | 'toggle5'
+ | 'toggle6'
+ | 'toggle7'
+ | 'toggle8'
+ | 'toggle9'
+ | 'toggle10'
+ | 'toggle11'
+ | 'toggle12'
+ | 'toggle13'
+ | 'arrow'
+ | 'arrow2'
+ | 'arrow3'
+ | 'bouncingBar'
+ | 'bouncingBall'
+ | 'smiley'
+ | 'monkey'
+ | 'hearts'
+ | 'clock'
+ | 'earth'
+ | 'material'
+ | 'moon'
+ | 'runner'
+ | 'pong'
+ | 'shark'
+ | 'dqpb'
+ | 'weather'
+ | 'christmas'
+ | 'grenade'
+ | 'point'
+ | 'layer'
+ | 'betaWave'
+ | 'fingerDance'
+ | 'fistBump'
+ | 'soccerHeader'
+ | 'mindblown'
+ | 'speaker'
+ | 'orangePulse'
+ | 'bluePulse'
+ | 'orangeBluePulse'
+ | 'timeTravel'
+ | 'aesthetic';
+
+ interface Spinner {
+ /**
+ Recommended interval.
+ */
+ readonly interval: number;
+
+ /**
+ A list of frames to show for the spinner.
+ */
+ readonly frames: string[];
+ }
+}
+
+/**
+70+ spinners for use in the terminal.
+
+@example
+```
+import cliSpinners = require('cli-spinners');
+
+console.log(cliSpinners.dots);
+// {
+// interval: 80,
+// frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
+// }
+```
+*/
+declare const cliSpinners: {
+ readonly [spinnerName in cliSpinners.SpinnerName]: cliSpinners.Spinner;
+} & {
+ /**
+ Returns a random spinner each time it's called.
+ */
+ readonly random: cliSpinners.Spinner;
+
+ // TODO: Remove this for the next major release
+ default: typeof cliSpinners;
+};
+
+export = cliSpinners;
diff --git a/node_modules/cli-spinners/index.js b/node_modules/cli-spinners/index.js
new file mode 100644
index 0000000..d7f9941
--- /dev/null
+++ b/node_modules/cli-spinners/index.js
@@ -0,0 +1,15 @@
+'use strict';
+
+const spinners = Object.assign({}, require('./spinners.json')); // eslint-disable-line import/extensions
+
+const spinnersList = Object.keys(spinners);
+
+Object.defineProperty(spinners, 'random', {
+ get() {
+ const randomIndex = Math.floor(Math.random() * spinnersList.length);
+ const spinnerName = spinnersList[randomIndex];
+ return spinners[spinnerName];
+ }
+});
+
+module.exports = spinners;
diff --git a/node_modules/cli-spinners/license b/node_modules/cli-spinners/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/cli-spinners/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/cli-spinners/package.json b/node_modules/cli-spinners/package.json
new file mode 100644
index 0000000..a192695
--- /dev/null
+++ b/node_modules/cli-spinners/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "cli-spinners",
+ "version": "2.7.0",
+ "description": "Spinners for use in the terminal",
+ "license": "MIT",
+ "repository": "sindresorhus/cli-spinners",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd",
+ "asciicast": "asciinema rec --command='node example-all.js' --title='cli-spinner' --quiet"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "spinners.json"
+ ],
+ "keywords": [
+ "cli",
+ "spinner",
+ "spinners",
+ "terminal",
+ "term",
+ "console",
+ "ascii",
+ "unicode",
+ "loading",
+ "indicator",
+ "progress",
+ "busy",
+ "wait",
+ "idle",
+ "json"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "log-update": "^3.2.0",
+ "string-length": "^4.0.1",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/cli-spinners/readme.md b/node_modules/cli-spinners/readme.md
new file mode 100644
index 0000000..74529de
--- /dev/null
+++ b/node_modules/cli-spinners/readme.md
@@ -0,0 +1,53 @@
+# cli-spinners
+
+> 70+ spinners for use in the terminal
+
+<p align="center">
+ <br>
+ <img width="700" src="screenshot.svg">
+ <br>
+ <br>
+</p>
+
+The list of spinners is just a [JSON file](spinners.json) and can be used wherever.
+
+You probably want to use one of these spinners through the [`ora`](https://github.com/sindresorhus/ora) module.
+
+## Install
+
+```
+$ npm install cli-spinners
+```
+
+## Usage
+
+```js
+const cliSpinners = require('cli-spinners');
+
+console.log(cliSpinners.dots);
+/*
+{
+ interval: 80,
+ frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
+}
+*/
+```
+
+## Preview
+
+The header GIF is outdated. See all the [spinner at once](https://jsfiddle.net/sindresorhus/2eLtsbey/embedded/result/) or [one at the time](https://asciinema.org/a/95348?size=big).
+
+## API
+
+Each spinner comes with a recommended `interval` and an array of `frames`.
+
+[See the spinners.](spinners.json)
+
+The `random` spinner will return a random spinner each time it's called.
+
+## Related
+
+- [ora](https://github.com/sindresorhus/ora) - Elegant terminal spinner
+- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinners for Swift
+- [py-spinners](https://github.com/ManrajGrover/py-spinners) - Python port
+- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
diff --git a/node_modules/cli-spinners/spinners.json b/node_modules/cli-spinners/spinners.json
new file mode 100644
index 0000000..16a5f6b
--- /dev/null
+++ b/node_modules/cli-spinners/spinners.json
@@ -0,0 +1,1468 @@
+{
+ "dots": {
+ "interval": 80,
+ "frames": [
+ "⠋",
+ "⠙",
+ "⠹",
+ "⠸",
+ "⠼",
+ "⠴",
+ "⠦",
+ "⠧",
+ "⠇",
+ "⠏"
+ ]
+ },
+ "dots2": {
+ "interval": 80,
+ "frames": [
+ "⣾",
+ "⣽",
+ "⣻",
+ "⢿",
+ "⡿",
+ "⣟",
+ "⣯",
+ "⣷"
+ ]
+ },
+ "dots3": {
+ "interval": 80,
+ "frames": [
+ "⠋",
+ "⠙",
+ "⠚",
+ "⠞",
+ "⠖",
+ "⠦",
+ "⠴",
+ "⠲",
+ "⠳",
+ "⠓"
+ ]
+ },
+ "dots4": {
+ "interval": 80,
+ "frames": [
+ "⠄",
+ "⠆",
+ "⠇",
+ "⠋",
+ "⠙",
+ "⠸",
+ "⠰",
+ "⠠",
+ "⠰",
+ "⠸",
+ "⠙",
+ "⠋",
+ "⠇",
+ "⠆"
+ ]
+ },
+ "dots5": {
+ "interval": 80,
+ "frames": [
+ "⠋",
+ "⠙",
+ "⠚",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠲",
+ "⠴",
+ "⠦",
+ "⠖",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠓",
+ "⠋"
+ ]
+ },
+ "dots6": {
+ "interval": 80,
+ "frames": [
+ "⠁",
+ "⠉",
+ "⠙",
+ "⠚",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠲",
+ "⠴",
+ "⠤",
+ "⠄",
+ "⠄",
+ "⠤",
+ "⠴",
+ "⠲",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠚",
+ "⠙",
+ "⠉",
+ "⠁"
+ ]
+ },
+ "dots7": {
+ "interval": 80,
+ "frames": [
+ "⠈",
+ "⠉",
+ "⠋",
+ "⠓",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠖",
+ "⠦",
+ "⠤",
+ "⠠",
+ "⠠",
+ "⠤",
+ "⠦",
+ "⠖",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠓",
+ "⠋",
+ "⠉",
+ "⠈"
+ ]
+ },
+ "dots8": {
+ "interval": 80,
+ "frames": [
+ "⠁",
+ "⠁",
+ "⠉",
+ "⠙",
+ "⠚",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠲",
+ "⠴",
+ "⠤",
+ "⠄",
+ "⠄",
+ "⠤",
+ "⠠",
+ "⠠",
+ "⠤",
+ "⠦",
+ "⠖",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠓",
+ "⠋",
+ "⠉",
+ "⠈",
+ "⠈"
+ ]
+ },
+ "dots9": {
+ "interval": 80,
+ "frames": [
+ "⢹",
+ "⢺",
+ "⢼",
+ "⣸",
+ "⣇",
+ "⡧",
+ "⡗",
+ "⡏"
+ ]
+ },
+ "dots10": {
+ "interval": 80,
+ "frames": [
+ "⢄",
+ "⢂",
+ "⢁",
+ "⡁",
+ "⡈",
+ "⡐",
+ "⡠"
+ ]
+ },
+ "dots11": {
+ "interval": 100,
+ "frames": [
+ "⠁",
+ "⠂",
+ "⠄",
+ "⡀",
+ "⢀",
+ "⠠",
+ "⠐",
+ "⠈"
+ ]
+ },
+ "dots12": {
+ "interval": 80,
+ "frames": [
+ "⢀⠀",
+ "⡀⠀",
+ "⠄⠀",
+ "⢂⠀",
+ "⡂⠀",
+ "⠅⠀",
+ "⢃⠀",
+ "⡃⠀",
+ "⠍⠀",
+ "⢋⠀",
+ "⡋⠀",
+ "⠍⠁",
+ "⢋⠁",
+ "⡋⠁",
+ "⠍⠉",
+ "⠋⠉",
+ "⠋⠉",
+ "⠉⠙",
+ "⠉⠙",
+ "⠉⠩",
+ "⠈⢙",
+ "⠈⡙",
+ "⢈⠩",
+ "⡀⢙",
+ "⠄⡙",
+ "⢂⠩",
+ "⡂⢘",
+ "⠅⡘",
+ "⢃⠨",
+ "⡃⢐",
+ "⠍⡐",
+ "⢋⠠",
+ "⡋⢀",
+ "⠍⡁",
+ "⢋⠁",
+ "⡋⠁",
+ "⠍⠉",
+ "⠋⠉",
+ "⠋⠉",
+ "⠉⠙",
+ "⠉⠙",
+ "⠉⠩",
+ "⠈⢙",
+ "⠈⡙",
+ "⠈⠩",
+ "⠀⢙",
+ "⠀⡙",
+ "⠀⠩",
+ "⠀⢘",
+ "⠀⡘",
+ "⠀⠨",
+ "⠀⢐",
+ "⠀⡐",
+ "⠀⠠",
+ "⠀⢀",
+ "⠀⡀"
+ ]
+ },
+ "dots13": {
+ "interval": 80,
+ "frames": [
+ "⣼",
+ "⣹",
+ "⢻",
+ "⠿",
+ "⡟",
+ "⣏",
+ "⣧",
+ "⣶"
+ ]
+ },
+ "dots8Bit": {
+ "interval": 80,
+ "frames": [
+ "⠀",
+ "⠁",
+ "⠂",
+ "⠃",
+ "⠄",
+ "⠅",
+ "⠆",
+ "⠇",
+ "⡀",
+ "⡁",
+ "⡂",
+ "⡃",
+ "⡄",
+ "⡅",
+ "⡆",
+ "⡇",
+ "⠈",
+ "⠉",
+ "⠊",
+ "⠋",
+ "⠌",
+ "⠍",
+ "⠎",
+ "⠏",
+ "⡈",
+ "⡉",
+ "⡊",
+ "⡋",
+ "⡌",
+ "⡍",
+ "⡎",
+ "⡏",
+ "⠐",
+ "⠑",
+ "⠒",
+ "⠓",
+ "⠔",
+ "⠕",
+ "⠖",
+ "⠗",
+ "⡐",
+ "⡑",
+ "⡒",
+ "⡓",
+ "⡔",
+ "⡕",
+ "⡖",
+ "⡗",
+ "⠘",
+ "⠙",
+ "⠚",
+ "⠛",
+ "⠜",
+ "⠝",
+ "⠞",
+ "⠟",
+ "⡘",
+ "⡙",
+ "⡚",
+ "⡛",
+ "⡜",
+ "⡝",
+ "⡞",
+ "⡟",
+ "⠠",
+ "⠡",
+ "⠢",
+ "⠣",
+ "⠤",
+ "⠥",
+ "⠦",
+ "⠧",
+ "⡠",
+ "⡡",
+ "⡢",
+ "⡣",
+ "⡤",
+ "⡥",
+ "⡦",
+ "⡧",
+ "⠨",
+ "⠩",
+ "⠪",
+ "⠫",
+ "⠬",
+ "⠭",
+ "⠮",
+ "⠯",
+ "⡨",
+ "⡩",
+ "⡪",
+ "⡫",
+ "⡬",
+ "⡭",
+ "⡮",
+ "⡯",
+ "⠰",
+ "⠱",
+ "⠲",
+ "⠳",
+ "⠴",
+ "⠵",
+ "⠶",
+ "⠷",
+ "⡰",
+ "⡱",
+ "⡲",
+ "⡳",
+ "⡴",
+ "⡵",
+ "⡶",
+ "⡷",
+ "⠸",
+ "⠹",
+ "⠺",
+ "⠻",
+ "⠼",
+ "⠽",
+ "⠾",
+ "⠿",
+ "⡸",
+ "⡹",
+ "⡺",
+ "⡻",
+ "⡼",
+ "⡽",
+ "⡾",
+ "⡿",
+ "⢀",
+ "⢁",
+ "⢂",
+ "⢃",
+ "⢄",
+ "⢅",
+ "⢆",
+ "⢇",
+ "⣀",
+ "⣁",
+ "⣂",
+ "⣃",
+ "⣄",
+ "⣅",
+ "⣆",
+ "⣇",
+ "⢈",
+ "⢉",
+ "⢊",
+ "⢋",
+ "⢌",
+ "⢍",
+ "⢎",
+ "⢏",
+ "⣈",
+ "⣉",
+ "⣊",
+ "⣋",
+ "⣌",
+ "⣍",
+ "⣎",
+ "⣏",
+ "⢐",
+ "⢑",
+ "⢒",
+ "⢓",
+ "⢔",
+ "⢕",
+ "⢖",
+ "⢗",
+ "⣐",
+ "⣑",
+ "⣒",
+ "⣓",
+ "⣔",
+ "⣕",
+ "⣖",
+ "⣗",
+ "⢘",
+ "⢙",
+ "⢚",
+ "⢛",
+ "⢜",
+ "⢝",
+ "⢞",
+ "⢟",
+ "⣘",
+ "⣙",
+ "⣚",
+ "⣛",
+ "⣜",
+ "⣝",
+ "⣞",
+ "⣟",
+ "⢠",
+ "⢡",
+ "⢢",
+ "⢣",
+ "⢤",
+ "⢥",
+ "⢦",
+ "⢧",
+ "⣠",
+ "⣡",
+ "⣢",
+ "⣣",
+ "⣤",
+ "⣥",
+ "⣦",
+ "⣧",
+ "⢨",
+ "⢩",
+ "⢪",
+ "⢫",
+ "⢬",
+ "⢭",
+ "⢮",
+ "⢯",
+ "⣨",
+ "⣩",
+ "⣪",
+ "⣫",
+ "⣬",
+ "⣭",
+ "⣮",
+ "⣯",
+ "⢰",
+ "⢱",
+ "⢲",
+ "⢳",
+ "⢴",
+ "⢵",
+ "⢶",
+ "⢷",
+ "⣰",
+ "⣱",
+ "⣲",
+ "⣳",
+ "⣴",
+ "⣵",
+ "⣶",
+ "⣷",
+ "⢸",
+ "⢹",
+ "⢺",
+ "⢻",
+ "⢼",
+ "⢽",
+ "⢾",
+ "⢿",
+ "⣸",
+ "⣹",
+ "⣺",
+ "⣻",
+ "⣼",
+ "⣽",
+ "⣾",
+ "⣿"
+ ]
+ },
+ "sand": {
+ "interval": 80,
+ "frames": [
+ "⠁",
+ "⠂",
+ "⠄",
+ "⡀",
+ "⡈",
+ "⡐",
+ "⡠",
+ "⣀",
+ "⣁",
+ "⣂",
+ "⣄",
+ "⣌",
+ "⣔",
+ "⣤",
+ "⣥",
+ "⣦",
+ "⣮",
+ "⣶",
+ "⣷",
+ "⣿",
+ "⡿",
+ "⠿",
+ "⢟",
+ "⠟",
+ "⡛",
+ "⠛",
+ "⠫",
+ "⢋",
+ "⠋",
+ "⠍",
+ "⡉",
+ "⠉",
+ "⠑",
+ "⠡",
+ "⢁"
+ ]
+ },
+ "line": {
+ "interval": 130,
+ "frames": [
+ "-",
+ "\\",
+ "|",
+ "/"
+ ]
+ },
+ "line2": {
+ "interval": 100,
+ "frames": [
+ "⠂",
+ "-",
+ "–",
+ "—",
+ "–",
+ "-"
+ ]
+ },
+ "pipe": {
+ "interval": 100,
+ "frames": [
+ "┤",
+ "┘",
+ "┴",
+ "└",
+ "├",
+ "┌",
+ "┬",
+ "┐"
+ ]
+ },
+ "simpleDots": {
+ "interval": 400,
+ "frames": [
+ ". ",
+ ".. ",
+ "...",
+ " "
+ ]
+ },
+ "simpleDotsScrolling": {
+ "interval": 200,
+ "frames": [
+ ". ",
+ ".. ",
+ "...",
+ " ..",
+ " .",
+ " "
+ ]
+ },
+ "star": {
+ "interval": 70,
+ "frames": [
+ "✶",
+ "✸",
+ "✹",
+ "✺",
+ "✹",
+ "✷"
+ ]
+ },
+ "star2": {
+ "interval": 80,
+ "frames": [
+ "+",
+ "x",
+ "*"
+ ]
+ },
+ "flip": {
+ "interval": 70,
+ "frames": [
+ "_",
+ "_",
+ "_",
+ "-",
+ "`",
+ "`",
+ "'",
+ "´",
+ "-",
+ "_",
+ "_",
+ "_"
+ ]
+ },
+ "hamburger": {
+ "interval": 100,
+ "frames": [
+ "☱",
+ "☲",
+ "☴"
+ ]
+ },
+ "growVertical": {
+ "interval": 120,
+ "frames": [
+ "▁",
+ "▃",
+ "▄",
+ "▅",
+ "▆",
+ "▇",
+ "▆",
+ "▅",
+ "▄",
+ "▃"
+ ]
+ },
+ "growHorizontal": {
+ "interval": 120,
+ "frames": [
+ "▏",
+ "▎",
+ "▍",
+ "▌",
+ "▋",
+ "▊",
+ "▉",
+ "▊",
+ "▋",
+ "▌",
+ "▍",
+ "▎"
+ ]
+ },
+ "balloon": {
+ "interval": 140,
+ "frames": [
+ " ",
+ ".",
+ "o",
+ "O",
+ "@",
+ "*",
+ " "
+ ]
+ },
+ "balloon2": {
+ "interval": 120,
+ "frames": [
+ ".",
+ "o",
+ "O",
+ "°",
+ "O",
+ "o",
+ "."
+ ]
+ },
+ "noise": {
+ "interval": 100,
+ "frames": [
+ "▓",
+ "▒",
+ "░"
+ ]
+ },
+ "bounce": {
+ "interval": 120,
+ "frames": [
+ "⠁",
+ "⠂",
+ "⠄",
+ "⠂"
+ ]
+ },
+ "boxBounce": {
+ "interval": 120,
+ "frames": [
+ "▖",
+ "▘",
+ "▝",
+ "▗"
+ ]
+ },
+ "boxBounce2": {
+ "interval": 100,
+ "frames": [
+ "▌",
+ "▀",
+ "▐",
+ "▄"
+ ]
+ },
+ "triangle": {
+ "interval": 50,
+ "frames": [
+ "◢",
+ "◣",
+ "◤",
+ "◥"
+ ]
+ },
+ "arc": {
+ "interval": 100,
+ "frames": [
+ "◜",
+ "◠",
+ "◝",
+ "◞",
+ "◡",
+ "◟"
+ ]
+ },
+ "circle": {
+ "interval": 120,
+ "frames": [
+ "◡",
+ "⊙",
+ "◠"
+ ]
+ },
+ "squareCorners": {
+ "interval": 180,
+ "frames": [
+ "◰",
+ "◳",
+ "◲",
+ "◱"
+ ]
+ },
+ "circleQuarters": {
+ "interval": 120,
+ "frames": [
+ "◴",
+ "◷",
+ "◶",
+ "◵"
+ ]
+ },
+ "circleHalves": {
+ "interval": 50,
+ "frames": [
+ "◐",
+ "◓",
+ "◑",
+ "◒"
+ ]
+ },
+ "squish": {
+ "interval": 100,
+ "frames": [
+ "╫",
+ "╪"
+ ]
+ },
+ "toggle": {
+ "interval": 250,
+ "frames": [
+ "⊶",
+ "⊷"
+ ]
+ },
+ "toggle2": {
+ "interval": 80,
+ "frames": [
+ "▫",
+ "▪"
+ ]
+ },
+ "toggle3": {
+ "interval": 120,
+ "frames": [
+ "□",
+ "■"
+ ]
+ },
+ "toggle4": {
+ "interval": 100,
+ "frames": [
+ "■",
+ "□",
+ "▪",
+ "▫"
+ ]
+ },
+ "toggle5": {
+ "interval": 100,
+ "frames": [
+ "▮",
+ "▯"
+ ]
+ },
+ "toggle6": {
+ "interval": 300,
+ "frames": [
+ "ဝ",
+ "၀"
+ ]
+ },
+ "toggle7": {
+ "interval": 80,
+ "frames": [
+ "⦾",
+ "⦿"
+ ]
+ },
+ "toggle8": {
+ "interval": 100,
+ "frames": [
+ "◍",
+ "◌"
+ ]
+ },
+ "toggle9": {
+ "interval": 100,
+ "frames": [
+ "◉",
+ "◎"
+ ]
+ },
+ "toggle10": {
+ "interval": 100,
+ "frames": [
+ "㊂",
+ "㊀",
+ "㊁"
+ ]
+ },
+ "toggle11": {
+ "interval": 50,
+ "frames": [
+ "⧇",
+ "⧆"
+ ]
+ },
+ "toggle12": {
+ "interval": 120,
+ "frames": [
+ "☗",
+ "☖"
+ ]
+ },
+ "toggle13": {
+ "interval": 80,
+ "frames": [
+ "=",
+ "*",
+ "-"
+ ]
+ },
+ "arrow": {
+ "interval": 100,
+ "frames": [
+ "←",
+ "↖",
+ "↑",
+ "↗",
+ "→",
+ "↘",
+ "↓",
+ "↙"
+ ]
+ },
+ "arrow2": {
+ "interval": 80,
+ "frames": [
+ "⬆️ ",
+ "↗️ ",
+ "➡️ ",
+ "↘️ ",
+ "⬇️ ",
+ "↙️ ",
+ "⬅️ ",
+ "↖️ "
+ ]
+ },
+ "arrow3": {
+ "interval": 120,
+ "frames": [
+ "▹▹▹▹▹",
+ "▸▹▹▹▹",
+ "▹▸▹▹▹",
+ "▹▹▸▹▹",
+ "▹▹▹▸▹",
+ "▹▹▹▹▸"
+ ]
+ },
+ "bouncingBar": {
+ "interval": 80,
+ "frames": [
+ "[ ]",
+ "[= ]",
+ "[== ]",
+ "[=== ]",
+ "[ ===]",
+ "[ ==]",
+ "[ =]",
+ "[ ]",
+ "[ =]",
+ "[ ==]",
+ "[ ===]",
+ "[====]",
+ "[=== ]",
+ "[== ]",
+ "[= ]"
+ ]
+ },
+ "bouncingBall": {
+ "interval": 80,
+ "frames": [
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "( ●)",
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "(● )"
+ ]
+ },
+ "smiley": {
+ "interval": 200,
+ "frames": [
+ "😄 ",
+ "😝 "
+ ]
+ },
+ "monkey": {
+ "interval": 300,
+ "frames": [
+ "🙈 ",
+ "🙈 ",
+ "🙉 ",
+ "🙊 "
+ ]
+ },
+ "hearts": {
+ "interval": 100,
+ "frames": [
+ "💛 ",
+ "💙 ",
+ "💜 ",
+ "💚 ",
+ "❤️ "
+ ]
+ },
+ "clock": {
+ "interval": 100,
+ "frames": [
+ "🕛 ",
+ "🕐 ",
+ "🕑 ",
+ "🕒 ",
+ "🕓 ",
+ "🕔 ",
+ "🕕 ",
+ "🕖 ",
+ "🕗 ",
+ "🕘 ",
+ "🕙 ",
+ "🕚 "
+ ]
+ },
+ "earth": {
+ "interval": 180,
+ "frames": [
+ "🌍 ",
+ "🌎 ",
+ "🌏 "
+ ]
+ },
+ "material": {
+ "interval": 17,
+ "frames": [
+ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "███████▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "████████▁▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "██████████▁▁▁▁▁▁▁▁▁▁",
+ "███████████▁▁▁▁▁▁▁▁▁",
+ "█████████████▁▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁▁██████████████▁▁▁▁",
+ "▁▁▁██████████████▁▁▁",
+ "▁▁▁▁█████████████▁▁▁",
+ "▁▁▁▁██████████████▁▁",
+ "▁▁▁▁██████████████▁▁",
+ "▁▁▁▁▁██████████████▁",
+ "▁▁▁▁▁██████████████▁",
+ "▁▁▁▁▁██████████████▁",
+ "▁▁▁▁▁▁██████████████",
+ "▁▁▁▁▁▁██████████████",
+ "▁▁▁▁▁▁▁█████████████",
+ "▁▁▁▁▁▁▁█████████████",
+ "▁▁▁▁▁▁▁▁████████████",
+ "▁▁▁▁▁▁▁▁████████████",
+ "▁▁▁▁▁▁▁▁▁███████████",
+ "▁▁▁▁▁▁▁▁▁███████████",
+ "▁▁▁▁▁▁▁▁▁▁██████████",
+ "▁▁▁▁▁▁▁▁▁▁██████████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁████████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
+ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "████████▁▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "███████████▁▁▁▁▁▁▁▁▁",
+ "████████████▁▁▁▁▁▁▁▁",
+ "████████████▁▁▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁▁▁█████████████▁▁▁▁",
+ "▁▁▁▁▁████████████▁▁▁",
+ "▁▁▁▁▁████████████▁▁▁",
+ "▁▁▁▁▁▁███████████▁▁▁",
+ "▁▁▁▁▁▁▁▁█████████▁▁▁",
+ "▁▁▁▁▁▁▁▁█████████▁▁▁",
+ "▁▁▁▁▁▁▁▁▁█████████▁▁",
+ "▁▁▁▁▁▁▁▁▁█████████▁▁",
+ "▁▁▁▁▁▁▁▁▁▁█████████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁████████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁████████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"
+ ]
+ },
+ "moon": {
+ "interval": 80,
+ "frames": [
+ "🌑 ",
+ "🌒 ",
+ "🌓 ",
+ "🌔 ",
+ "🌕 ",
+ "🌖 ",
+ "🌗 ",
+ "🌘 "
+ ]
+ },
+ "runner": {
+ "interval": 140,
+ "frames": [
+ "🚶 ",
+ "🏃 "
+ ]
+ },
+ "pong": {
+ "interval": 80,
+ "frames": [
+ "▐⠂ ▌",
+ "▐⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂▌",
+ "▐ ⠠▌",
+ "▐ ⡀▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐⠠ ▌"
+ ]
+ },
+ "shark": {
+ "interval": 120,
+ "frames": [
+ "▐|\\____________▌",
+ "▐_|\\___________▌",
+ "▐__|\\__________▌",
+ "▐___|\\_________▌",
+ "▐____|\\________▌",
+ "▐_____|\\_______▌",
+ "▐______|\\______▌",
+ "▐_______|\\_____▌",
+ "▐________|\\____▌",
+ "▐_________|\\___▌",
+ "▐__________|\\__▌",
+ "▐___________|\\_▌",
+ "▐____________|\\▌",
+ "▐____________/|▌",
+ "▐___________/|_▌",
+ "▐__________/|__▌",
+ "▐_________/|___▌",
+ "▐________/|____▌",
+ "▐_______/|_____▌",
+ "▐______/|______▌",
+ "▐_____/|_______▌",
+ "▐____/|________▌",
+ "▐___/|_________▌",
+ "▐__/|__________▌",
+ "▐_/|___________▌",
+ "▐/|____________▌"
+ ]
+ },
+ "dqpb": {
+ "interval": 100,
+ "frames": [
+ "d",
+ "q",
+ "p",
+ "b"
+ ]
+ },
+ "weather": {
+ "interval": 100,
+ "frames": [
+ "☀️ ",
+ "☀️ ",
+ "☀️ ",
+ "🌤 ",
+ "⛅️ ",
+ "🌥 ",
+ "☁️ ",
+ "🌧 ",
+ "🌨 ",
+ "🌧 ",
+ "🌨 ",
+ "🌧 ",
+ "🌨 ",
+ "⛈ ",
+ "🌨 ",
+ "🌧 ",
+ "🌨 ",
+ "☁️ ",
+ "🌥 ",
+ "⛅️ ",
+ "🌤 ",
+ "☀️ ",
+ "☀️ "
+ ]
+ },
+ "christmas": {
+ "interval": 400,
+ "frames": [
+ "🌲",
+ "🎄"
+ ]
+ },
+ "grenade": {
+ "interval": 80,
+ "frames": [
+ "، ",
+ "′ ",
+ " ´ ",
+ " ‾ ",
+ " ⸌",
+ " ⸊",
+ " |",
+ " ⁎",
+ " ⁕",
+ " ෴ ",
+ " ⁓",
+ " ",
+ " ",
+ " "
+ ]
+ },
+ "point": {
+ "interval": 125,
+ "frames": [
+ "∙∙∙",
+ "●∙∙",
+ "∙●∙",
+ "∙∙●",
+ "∙∙∙"
+ ]
+ },
+ "layer": {
+ "interval": 150,
+ "frames": [
+ "-",
+ "=",
+ "≡"
+ ]
+ },
+ "betaWave": {
+ "interval": 80,
+ "frames": [
+ "ρββββββ",
+ "βρβββββ",
+ "ββρββββ",
+ "βββρβββ",
+ "ββββρββ",
+ "βββββρβ",
+ "ββββββρ"
+ ]
+ },
+ "fingerDance": {
+ "interval": 160,
+ "frames": [
+ "🤘 ",
+ "🤟 ",
+ "🖖 ",
+ "✋ ",
+ "🤚 ",
+ "👆 "
+ ]
+ },
+ "fistBump": {
+ "interval": 80,
+ "frames": [
+ "🤜\u3000\u3000\u3000\u3000🤛 ",
+ "🤜\u3000\u3000\u3000\u3000🤛 ",
+ "🤜\u3000\u3000\u3000\u3000🤛 ",
+ "\u3000🤜\u3000\u3000🤛\u3000 ",
+ "\u3000\u3000🤜🤛\u3000\u3000 ",
+ "\u3000🤜✨🤛\u3000\u3000 ",
+ "🤜\u3000✨\u3000🤛\u3000 "
+ ]
+ },
+ "soccerHeader": {
+ "interval": 80,
+ "frames": [
+ " 🧑⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 ",
+ "🧑 ⚽️ 🧑 "
+ ]
+ },
+ "mindblown": {
+ "interval": 160,
+ "frames": [
+ "😐 ",
+ "😐 ",
+ "😮 ",
+ "😮 ",
+ "😦 ",
+ "😦 ",
+ "😧 ",
+ "😧 ",
+ "🤯 ",
+ "💥 ",
+ "✨ ",
+ "\u3000 ",
+ "\u3000 ",
+ "\u3000 "
+ ]
+ },
+ "speaker": {
+ "interval": 160,
+ "frames": [
+ "🔈 ",
+ "🔉 ",
+ "🔊 ",
+ "🔉 "
+ ]
+ },
+ "orangePulse": {
+ "interval": 100,
+ "frames": [
+ "🔸 ",
+ "🔶 ",
+ "🟠 ",
+ "🟠 ",
+ "🔶 "
+ ]
+ },
+ "bluePulse": {
+ "interval": 100,
+ "frames": [
+ "🔹 ",
+ "🔷 ",
+ "🔵 ",
+ "🔵 ",
+ "🔷 "
+ ]
+ },
+ "orangeBluePulse": {
+ "interval": 100,
+ "frames": [
+ "🔸 ",
+ "🔶 ",
+ "🟠 ",
+ "🟠 ",
+ "🔶 ",
+ "🔹 ",
+ "🔷 ",
+ "🔵 ",
+ "🔵 ",
+ "🔷 "
+ ]
+ },
+ "timeTravel": {
+ "interval": 100,
+ "frames": [
+ "🕛 ",
+ "🕚 ",
+ "🕙 ",
+ "🕘 ",
+ "🕗 ",
+ "🕖 ",
+ "🕕 ",
+ "🕔 ",
+ "🕓 ",
+ "🕒 ",
+ "🕑 ",
+ "🕐 "
+ ]
+ },
+ "aesthetic": {
+ "interval": 80,
+ "frames": [
+ "▰▱▱▱▱▱▱",
+ "▰▰▱▱▱▱▱",
+ "▰▰▰▱▱▱▱",
+ "▰▰▰▰▱▱▱",
+ "▰▰▰▰▰▱▱",
+ "▰▰▰▰▰▰▱",
+ "▰▰▰▰▰▰▰",
+ "▰▱▱▱▱▱▱"
+ ]
+ }
+}
diff --git a/node_modules/clone/.npmignore b/node_modules/clone/.npmignore
new file mode 100644
index 0000000..c797cbf
--- /dev/null
+++ b/node_modules/clone/.npmignore
@@ -0,0 +1,4 @@
+/node_modules/
+/test.js
+/*.html
+/.travis.yml
diff --git a/node_modules/clone/LICENSE b/node_modules/clone/LICENSE
new file mode 100644
index 0000000..cc3c87b
--- /dev/null
+++ b/node_modules/clone/LICENSE
@@ -0,0 +1,18 @@
+Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the “Software”), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/clone/README.md b/node_modules/clone/README.md
new file mode 100644
index 0000000..0b6ceca
--- /dev/null
+++ b/node_modules/clone/README.md
@@ -0,0 +1,126 @@
+# clone
+
+[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone)
+
+[![info badge](https://nodei.co/npm/clone.png?downloads=true&downloadRank=true&stars=true)](http://npm-stat.com/charts.html?package=clone)
+
+offers foolproof _deep cloning_ of objects, arrays, numbers, strings etc. in JavaScript.
+
+
+## Installation
+
+ npm install clone
+
+(It also works with browserify, ender or standalone.)
+
+
+## Example
+
+~~~ javascript
+var clone = require('clone');
+
+var a, b;
+
+a = { foo: { bar: 'baz' } }; // initial value of a
+
+b = clone(a); // clone a -> b
+a.foo.bar = 'foo'; // change a
+
+console.log(a); // show a
+console.log(b); // show b
+~~~
+
+This will print:
+
+~~~ javascript
+{ foo: { bar: 'foo' } }
+{ foo: { bar: 'baz' } }
+~~~
+
+**clone** masters cloning simple objects (even with custom prototype), arrays,
+Date objects, and RegExp objects. Everything is cloned recursively, so that you
+can clone dates in arrays in objects, for example.
+
+
+## API
+
+`clone(val, circular, depth)`
+
+ * `val` -- the value that you want to clone, any type allowed
+ * `circular` -- boolean
+
+ Call `clone` with `circular` set to `false` if you are certain that `obj`
+ contains no circular references. This will give better performance if needed.
+ There is no error if `undefined` or `null` is passed as `obj`.
+ * `depth` -- depth to which the object is to be cloned (optional,
+ defaults to infinity)
+
+`clone.clonePrototype(obj)`
+
+ * `obj` -- the object that you want to clone
+
+Does a prototype clone as
+[described by Oran Looney](http://oranlooney.com/functional-javascript/).
+
+
+## Circular References
+
+~~~ javascript
+var a, b;
+
+a = { hello: 'world' };
+
+a.myself = a;
+b = clone(a);
+
+console.log(b);
+~~~
+
+This will print:
+
+~~~ javascript
+{ hello: "world", myself: [Circular] }
+~~~
+
+So, `b.myself` points to `b`, not `a`. Neat!
+
+
+## Test
+
+ npm test
+
+
+## Caveat
+
+Some special objects like a socket or `process.stdout`/`stderr` are known to not
+be cloneable. If you find other objects that cannot be cloned, please [open an
+issue](https://github.com/pvorb/node-clone/issues/new).
+
+
+## Bugs and Issues
+
+If you encounter any bugs or issues, feel free to [open an issue at
+github](https://github.com/pvorb/node-clone/issues) or send me an email to
+<paul@vorba.ch>. I also always like to hear from you, if you’re using my code.
+
+## License
+
+Copyright © 2011-2015 [Paul Vorbach](http://paul.vorba.ch/) and
+[contributors](https://github.com/pvorb/node-clone/graphs/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, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/clone/clone.iml b/node_modules/clone/clone.iml
new file mode 100644
index 0000000..30de8ae
--- /dev/null
+++ b/node_modules/clone/clone.iml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="clone node_modules" level="project" />
+ </component>
+</module> \ No newline at end of file
diff --git a/node_modules/clone/clone.js b/node_modules/clone/clone.js
new file mode 100644
index 0000000..ba200c2
--- /dev/null
+++ b/node_modules/clone/clone.js
@@ -0,0 +1,166 @@
+var clone = (function() {
+'use strict';
+
+/**
+ * Clones (copies) an Object using deep copying.
+ *
+ * This function supports circular references by default, but if you are certain
+ * there are no circular references in your object, you can save some CPU time
+ * by calling clone(obj, false).
+ *
+ * Caution: if `circular` is false and `parent` contains circular references,
+ * your program may enter an infinite loop and crash.
+ *
+ * @param `parent` - the object to be cloned
+ * @param `circular` - set to true if the object to be cloned may contain
+ * circular references. (optional - true by default)
+ * @param `depth` - set to a number if the object is only to be cloned to
+ * a particular depth. (optional - defaults to Infinity)
+ * @param `prototype` - sets the prototype to be used when cloning an object.
+ * (optional - defaults to parent prototype).
+*/
+function clone(parent, circular, depth, prototype) {
+ var filter;
+ if (typeof circular === 'object') {
+ depth = circular.depth;
+ prototype = circular.prototype;
+ filter = circular.filter;
+ circular = circular.circular
+ }
+ // maintain two arrays for circular references, where corresponding parents
+ // and children have the same index
+ var allParents = [];
+ var allChildren = [];
+
+ var useBuffer = typeof Buffer != 'undefined';
+
+ if (typeof circular == 'undefined')
+ circular = true;
+
+ if (typeof depth == 'undefined')
+ depth = Infinity;
+
+ // recurse this function so we don't reset allParents and allChildren
+ function _clone(parent, depth) {
+ // cloning null always returns null
+ if (parent === null)
+ return null;
+
+ if (depth == 0)
+ return parent;
+
+ var child;
+ var proto;
+ if (typeof parent != 'object') {
+ return parent;
+ }
+
+ if (clone.__isArray(parent)) {
+ child = [];
+ } else if (clone.__isRegExp(parent)) {
+ child = new RegExp(parent.source, __getRegExpFlags(parent));
+ if (parent.lastIndex) child.lastIndex = parent.lastIndex;
+ } else if (clone.__isDate(parent)) {
+ child = new Date(parent.getTime());
+ } else if (useBuffer && Buffer.isBuffer(parent)) {
+ if (Buffer.allocUnsafe) {
+ // Node.js >= 4.5.0
+ child = Buffer.allocUnsafe(parent.length);
+ } else {
+ // Older Node.js versions
+ child = new Buffer(parent.length);
+ }
+ parent.copy(child);
+ return child;
+ } else {
+ if (typeof prototype == 'undefined') {
+ proto = Object.getPrototypeOf(parent);
+ child = Object.create(proto);
+ }
+ else {
+ child = Object.create(prototype);
+ proto = prototype;
+ }
+ }
+
+ if (circular) {
+ var index = allParents.indexOf(parent);
+
+ if (index != -1) {
+ return allChildren[index];
+ }
+ allParents.push(parent);
+ allChildren.push(child);
+ }
+
+ for (var i in parent) {
+ var attrs;
+ if (proto) {
+ attrs = Object.getOwnPropertyDescriptor(proto, i);
+ }
+
+ if (attrs && attrs.set == null) {
+ continue;
+ }
+ child[i] = _clone(parent[i], depth - 1);
+ }
+
+ return child;
+ }
+
+ return _clone(parent, depth);
+}
+
+/**
+ * Simple flat clone using prototype, accepts only objects, usefull for property
+ * override on FLAT configuration object (no nested props).
+ *
+ * USE WITH CAUTION! This may not behave as you wish if you do not know how this
+ * works.
+ */
+clone.clonePrototype = function clonePrototype(parent) {
+ if (parent === null)
+ return null;
+
+ var c = function () {};
+ c.prototype = parent;
+ return new c();
+};
+
+// private utility functions
+
+function __objToStr(o) {
+ return Object.prototype.toString.call(o);
+};
+clone.__objToStr = __objToStr;
+
+function __isDate(o) {
+ return typeof o === 'object' && __objToStr(o) === '[object Date]';
+};
+clone.__isDate = __isDate;
+
+function __isArray(o) {
+ return typeof o === 'object' && __objToStr(o) === '[object Array]';
+};
+clone.__isArray = __isArray;
+
+function __isRegExp(o) {
+ return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
+};
+clone.__isRegExp = __isRegExp;
+
+function __getRegExpFlags(re) {
+ var flags = '';
+ if (re.global) flags += 'g';
+ if (re.ignoreCase) flags += 'i';
+ if (re.multiline) flags += 'm';
+ return flags;
+};
+clone.__getRegExpFlags = __getRegExpFlags;
+
+return clone;
+})();
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = clone;
+}
diff --git a/node_modules/clone/package.json b/node_modules/clone/package.json
new file mode 100644
index 0000000..3ddd242
--- /dev/null
+++ b/node_modules/clone/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "clone",
+ "description": "deep cloning of objects and arrays",
+ "tags": [
+ "clone",
+ "object",
+ "array",
+ "function",
+ "date"
+ ],
+ "version": "1.0.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/pvorb/node-clone.git"
+ },
+ "bugs": {
+ "url": "https://github.com/pvorb/node-clone/issues"
+ },
+ "main": "clone.js",
+ "author": "Paul Vorbach <paul@vorba.ch> (http://paul.vorba.ch/)",
+ "contributors": [
+ "Blake Miner <miner.blake@gmail.com> (http://www.blakeminer.com/)",
+ "Tian You <axqd001@gmail.com> (http://blog.axqd.net/)",
+ "George Stagas <gstagas@gmail.com> (http://stagas.com/)",
+ "Tobiasz Cudnik <tobiasz.cudnik@gmail.com> (https://github.com/TobiaszCudnik)",
+ "Pavel Lang <langpavel@phpskelet.org> (https://github.com/langpavel)",
+ "Dan MacTough (http://yabfog.com/)",
+ "w1nk (https://github.com/w1nk)",
+ "Hugh Kennedy (http://twitter.com/hughskennedy)",
+ "Dustin Diaz (http://dustindiaz.com)",
+ "Ilya Shaisultanov (https://github.com/diversario)",
+ "Nathan MacInnes <nathan@macinn.es> (http://macinn.es/)",
+ "Benjamin E. Coe <ben@npmjs.com> (https://twitter.com/benjamincoe)",
+ "Nathan Zadoks (https://github.com/nathan7)",
+ "Róbert Oroszi <robert+gh@oroszi.net> (https://github.com/oroce)",
+ "Aurélio A. Heckert (http://softwarelivre.org/aurium)",
+ "Guy Ellis (http://www.guyellisrocks.com/)"
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "nodeunit": "~0.9.0"
+ },
+ "optionalDependencies": {},
+ "scripts": {
+ "test": "nodeunit test.js"
+ }
+}
diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md
new file mode 100644
index 0000000..0a7bce4
--- /dev/null
+++ b/node_modules/color-convert/CHANGELOG.md
@@ -0,0 +1,54 @@
+# 1.0.0 - 2016-01-07
+
+- Removed: unused speed test
+- Added: Automatic routing between previously unsupported conversions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `convert()` class
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: all functions to lookup dictionary
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: `ansi` to `ansi256`
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Fixed: argument grouping for functions requiring only one argument
+([#27](https://github.com/Qix-/color-convert/pull/27))
+
+# 0.6.0 - 2015-07-23
+
+- Added: methods to handle
+[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors:
+ - rgb2ansi16
+ - rgb2ansi
+ - hsl2ansi16
+ - hsl2ansi
+ - hsv2ansi16
+ - hsv2ansi
+ - hwb2ansi16
+ - hwb2ansi
+ - cmyk2ansi16
+ - cmyk2ansi
+ - keyword2ansi16
+ - keyword2ansi
+ - ansi162rgb
+ - ansi162hsl
+ - ansi162hsv
+ - ansi162hwb
+ - ansi162cmyk
+ - ansi162keyword
+ - ansi2rgb
+ - ansi2hsl
+ - ansi2hsv
+ - ansi2hwb
+ - ansi2cmyk
+ - ansi2keyword
+([#18](https://github.com/harthur/color-convert/pull/18))
+
+# 0.5.3 - 2015-06-02
+
+- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]`
+([#15](https://github.com/harthur/color-convert/issues/15))
+
+---
+
+Check out commit logs for older releases
diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE
new file mode 100644
index 0000000..5b4c386
--- /dev/null
+++ b/node_modules/color-convert/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011-2016 Heather Arthur <fayearthur@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/color-convert/README.md b/node_modules/color-convert/README.md
new file mode 100644
index 0000000..d4b08fc
--- /dev/null
+++ b/node_modules/color-convert/README.md
@@ -0,0 +1,68 @@
+# color-convert
+
+[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
+
+Color-convert is a color conversion library for JavaScript and node.
+It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
+convert.keyword.rgb('blue'); // [0, 0, 255]
+
+var rgbChannels = convert.rgb.channels; // 3
+var cmykChannels = convert.cmyk.channels; // 4
+var ansiChannels = convert.ansi16.channels; // 1
+```
+
+# Install
+
+```console
+$ npm install color-convert
+```
+
+# API
+
+Simply get the property of the _from_ and _to_ conversion that you're looking for.
+
+All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
+
+All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
+
+```js
+var convert = require('color-convert');
+
+// Hex to LAB
+convert.hex.lab('DEADBF'); // [ 76, 21, -2 ]
+convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
+
+// RGB to CMYK
+convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ]
+convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
+```
+
+### Arrays
+All functions that accept multiple arguments also support passing an array.
+
+Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hex(123, 45, 67); // '7B2D43'
+convert.rgb.hex([123, 45, 67]); // '7B2D43'
+```
+
+## Routing
+
+Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
+
+Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
+
+# Contribute
+
+If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
+
+# License
+Copyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).
diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js
new file mode 100644
index 0000000..2657f26
--- /dev/null
+++ b/node_modules/color-convert/conversions.js
@@ -0,0 +1,839 @@
+/* MIT license */
+/* eslint-disable no-mixed-operators */
+const cssKeywords = require('color-name');
+
+// NOTE: conversions should only return primitive values (i.e. arrays, or
+// values that give correct `typeof` results).
+// do not use box values types (i.e. Number(), String(), etc.)
+
+const reverseKeywords = {};
+for (const key of Object.keys(cssKeywords)) {
+ reverseKeywords[cssKeywords[key]] = key;
+}
+
+const convert = {
+ rgb: {channels: 3, labels: 'rgb'},
+ hsl: {channels: 3, labels: 'hsl'},
+ hsv: {channels: 3, labels: 'hsv'},
+ hwb: {channels: 3, labels: 'hwb'},
+ cmyk: {channels: 4, labels: 'cmyk'},
+ xyz: {channels: 3, labels: 'xyz'},
+ lab: {channels: 3, labels: 'lab'},
+ lch: {channels: 3, labels: 'lch'},
+ hex: {channels: 1, labels: ['hex']},
+ keyword: {channels: 1, labels: ['keyword']},
+ ansi16: {channels: 1, labels: ['ansi16']},
+ ansi256: {channels: 1, labels: ['ansi256']},
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
+ gray: {channels: 1, labels: ['gray']}
+};
+
+module.exports = convert;
+
+// Hide .channels and .labels properties
+for (const model of Object.keys(convert)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
+
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
+
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
+
+ const {channels, labels} = convert[model];
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {value: channels});
+ Object.defineProperty(convert[model], 'labels', {value: labels});
+}
+
+convert.rgb.hsl = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const min = Math.min(r, g, b);
+ const max = Math.max(r, g, b);
+ const delta = max - min;
+ let h;
+ let s;
+
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
+
+ h = Math.min(h * 60, 360);
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ const l = (min + max) / 2;
+
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
+
+ return [h, s * 100, l * 100];
+};
+
+convert.rgb.hsv = function (rgb) {
+ let rdif;
+ let gdif;
+ let bdif;
+ let h;
+ let s;
+
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const v = Math.max(r, g, b);
+ const diff = v - Math.min(r, g, b);
+ const diffc = function (c) {
+ return (v - c) / 6 / diff + 1 / 2;
+ };
+
+ if (diff === 0) {
+ h = 0;
+ s = 0;
+ } else {
+ s = diff / v;
+ rdif = diffc(r);
+ gdif = diffc(g);
+ bdif = diffc(b);
+
+ if (r === v) {
+ h = bdif - gdif;
+ } else if (g === v) {
+ h = (1 / 3) + rdif - bdif;
+ } else if (b === v) {
+ h = (2 / 3) + gdif - rdif;
+ }
+
+ if (h < 0) {
+ h += 1;
+ } else if (h > 1) {
+ h -= 1;
+ }
+ }
+
+ return [
+ h * 360,
+ s * 100,
+ v * 100
+ ];
+};
+
+convert.rgb.hwb = function (rgb) {
+ const r = rgb[0];
+ const g = rgb[1];
+ let b = rgb[2];
+ const h = convert.rgb.hsl(rgb)[0];
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
+
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+
+ return [h, w * 100, b * 100];
+};
+
+convert.rgb.cmyk = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+
+ const k = Math.min(1 - r, 1 - g, 1 - b);
+ const c = (1 - r - k) / (1 - k) || 0;
+ const m = (1 - g - k) / (1 - k) || 0;
+ const y = (1 - b - k) / (1 - k) || 0;
+
+ return [c * 100, m * 100, y * 100, k * 100];
+};
+
+function comparativeDistance(x, y) {
+ /*
+ See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ */
+ return (
+ ((x[0] - y[0]) ** 2) +
+ ((x[1] - y[1]) ** 2) +
+ ((x[2] - y[2]) ** 2)
+ );
+}
+
+convert.rgb.keyword = function (rgb) {
+ const reversed = reverseKeywords[rgb];
+ if (reversed) {
+ return reversed;
+ }
+
+ let currentClosestDistance = Infinity;
+ let currentClosestKeyword;
+
+ for (const keyword of Object.keys(cssKeywords)) {
+ const value = cssKeywords[keyword];
+
+ // Compute comparative distance
+ const distance = comparativeDistance(rgb, value);
+
+ // Check if its less, if so set as closest
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+
+ return currentClosestKeyword;
+};
+
+convert.keyword.rgb = function (keyword) {
+ return cssKeywords[keyword];
+};
+
+convert.rgb.xyz = function (rgb) {
+ let r = rgb[0] / 255;
+ let g = rgb[1] / 255;
+ let b = rgb[2] / 255;
+
+ // Assume sRGB
+ r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
+ g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
+ b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
+
+ const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
+ const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
+ const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
+
+ return [x * 100, y * 100, z * 100];
+};
+
+convert.rgb.lab = function (rgb) {
+ const xyz = convert.rgb.xyz(rgb);
+ let x = xyz[0];
+ let y = xyz[1];
+ let z = xyz[2];
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
+
+ const l = (116 * y) - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.hsl.rgb = function (hsl) {
+ const h = hsl[0] / 360;
+ const s = hsl[1] / 100;
+ const l = hsl[2] / 100;
+ let t2;
+ let t3;
+ let val;
+
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
+ }
+
+ if (l < 0.5) {
+ t2 = l * (1 + s);
+ } else {
+ t2 = l + s - l * s;
+ }
+
+ const t1 = 2 * l - t2;
+
+ const rgb = [0, 0, 0];
+ for (let i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
+ if (t3 < 0) {
+ t3++;
+ }
+
+ if (t3 > 1) {
+ t3--;
+ }
+
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
+
+ rgb[i] = val * 255;
+ }
+
+ return rgb;
+};
+
+convert.hsl.hsv = function (hsl) {
+ const h = hsl[0];
+ let s = hsl[1] / 100;
+ let l = hsl[2] / 100;
+ let smin = s;
+ const lmin = Math.max(l, 0.01);
+
+ l *= 2;
+ s *= (l <= 1) ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ const v = (l + s) / 2;
+ const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
+
+ return [h, sv * 100, v * 100];
+};
+
+convert.hsv.rgb = function (hsv) {
+ const h = hsv[0] / 60;
+ const s = hsv[1] / 100;
+ let v = hsv[2] / 100;
+ const hi = Math.floor(h) % 6;
+
+ const f = h - Math.floor(h);
+ const p = 255 * v * (1 - s);
+ const q = 255 * v * (1 - (s * f));
+ const t = 255 * v * (1 - (s * (1 - f)));
+ v *= 255;
+
+ switch (hi) {
+ case 0:
+ return [v, t, p];
+ case 1:
+ return [q, v, p];
+ case 2:
+ return [p, v, t];
+ case 3:
+ return [p, q, v];
+ case 4:
+ return [t, p, v];
+ case 5:
+ return [v, p, q];
+ }
+};
+
+convert.hsv.hsl = function (hsv) {
+ const h = hsv[0];
+ const s = hsv[1] / 100;
+ const v = hsv[2] / 100;
+ const vmin = Math.max(v, 0.01);
+ let sl;
+ let l;
+
+ l = (2 - s) * v;
+ const lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
+
+ return [h, sl * 100, l * 100];
+};
+
+// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+convert.hwb.rgb = function (hwb) {
+ const h = hwb[0] / 360;
+ let wh = hwb[1] / 100;
+ let bl = hwb[2] / 100;
+ const ratio = wh + bl;
+ let f;
+
+ // Wh + bl cant be > 1
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
+
+ const i = Math.floor(6 * h);
+ const v = 1 - bl;
+ f = 6 * h - i;
+
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
+
+ const n = wh + f * (v - wh); // Linear interpolation
+
+ let r;
+ let g;
+ let b;
+ /* eslint-disable max-statements-per-line,no-multi-spaces */
+ switch (i) {
+ default:
+ case 6:
+ case 0: r = v; g = n; b = wh; break;
+ case 1: r = n; g = v; b = wh; break;
+ case 2: r = wh; g = v; b = n; break;
+ case 3: r = wh; g = n; b = v; break;
+ case 4: r = n; g = wh; b = v; break;
+ case 5: r = v; g = wh; b = n; break;
+ }
+ /* eslint-enable max-statements-per-line,no-multi-spaces */
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.cmyk.rgb = function (cmyk) {
+ const c = cmyk[0] / 100;
+ const m = cmyk[1] / 100;
+ const y = cmyk[2] / 100;
+ const k = cmyk[3] / 100;
+
+ const r = 1 - Math.min(1, c * (1 - k) + k);
+ const g = 1 - Math.min(1, m * (1 - k) + k);
+ const b = 1 - Math.min(1, y * (1 - k) + k);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.rgb = function (xyz) {
+ const x = xyz[0] / 100;
+ const y = xyz[1] / 100;
+ const z = xyz[2] / 100;
+ let r;
+ let g;
+ let b;
+
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
+
+ // Assume sRGB
+ r = r > 0.0031308
+ ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
+ : r * 12.92;
+
+ g = g > 0.0031308
+ ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
+ : g * 12.92;
+
+ b = b > 0.0031308
+ ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
+ : b * 12.92;
+
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.lab = function (xyz) {
+ let x = xyz[0];
+ let y = xyz[1];
+ let z = xyz[2];
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
+
+ const l = (116 * y) - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.lab.xyz = function (lab) {
+ const l = lab[0];
+ const a = lab[1];
+ const b = lab[2];
+ let x;
+ let y;
+ let z;
+
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+
+ const y2 = y ** 3;
+ const x2 = x ** 3;
+ const z2 = z ** 3;
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
+
+ return [x, y, z];
+};
+
+convert.lab.lch = function (lab) {
+ const l = lab[0];
+ const a = lab[1];
+ const b = lab[2];
+ let h;
+
+ const hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ const c = Math.sqrt(a * a + b * b);
+
+ return [l, c, h];
+};
+
+convert.lch.lab = function (lch) {
+ const l = lch[0];
+ const c = lch[1];
+ const h = lch[2];
+
+ const hr = h / 360 * 2 * Math.PI;
+ const a = c * Math.cos(hr);
+ const b = c * Math.sin(hr);
+
+ return [l, a, b];
+};
+
+convert.rgb.ansi16 = function (args, saturation = null) {
+ const [r, g, b] = args;
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
+
+ value = Math.round(value / 50);
+
+ if (value === 0) {
+ return 30;
+ }
+
+ let ansi = 30
+ + ((Math.round(b / 255) << 2)
+ | (Math.round(g / 255) << 1)
+ | Math.round(r / 255));
+
+ if (value === 2) {
+ ansi += 60;
+ }
+
+ return ansi;
+};
+
+convert.hsv.ansi16 = function (args) {
+ // Optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
+};
+
+convert.rgb.ansi256 = function (args) {
+ const r = args[0];
+ const g = args[1];
+ const b = args[2];
+
+ // We use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
+
+ if (r > 248) {
+ return 231;
+ }
+
+ return Math.round(((r - 8) / 247) * 24) + 232;
+ }
+
+ const ansi = 16
+ + (36 * Math.round(r / 255 * 5))
+ + (6 * Math.round(g / 255 * 5))
+ + Math.round(b / 255 * 5);
+
+ return ansi;
+};
+
+convert.ansi16.rgb = function (args) {
+ let color = args % 10;
+
+ // Handle greyscale
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
+ }
+
+ color = color / 10.5 * 255;
+
+ return [color, color, color];
+ }
+
+ const mult = (~~(args > 50) + 1) * 0.5;
+ const r = ((color & 1) * mult) * 255;
+ const g = (((color >> 1) & 1) * mult) * 255;
+ const b = (((color >> 2) & 1) * mult) * 255;
+
+ return [r, g, b];
+};
+
+convert.ansi256.rgb = function (args) {
+ // Handle greyscale
+ if (args >= 232) {
+ const c = (args - 232) * 10 + 8;
+ return [c, c, c];
+ }
+
+ args -= 16;
+
+ let rem;
+ const r = Math.floor(args / 36) / 5 * 255;
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ const b = (rem % 6) / 5 * 255;
+
+ return [r, g, b];
+};
+
+convert.rgb.hex = function (args) {
+ const integer = ((Math.round(args[0]) & 0xFF) << 16)
+ + ((Math.round(args[1]) & 0xFF) << 8)
+ + (Math.round(args[2]) & 0xFF);
+
+ const string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.hex.rgb = function (args) {
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match) {
+ return [0, 0, 0];
+ }
+
+ let colorString = match[0];
+
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(char => {
+ return char + char;
+ }).join('');
+ }
+
+ const integer = parseInt(colorString, 16);
+ const r = (integer >> 16) & 0xFF;
+ const g = (integer >> 8) & 0xFF;
+ const b = integer & 0xFF;
+
+ return [r, g, b];
+};
+
+convert.rgb.hcg = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const max = Math.max(Math.max(r, g), b);
+ const min = Math.min(Math.min(r, g), b);
+ const chroma = (max - min);
+ let grayscale;
+ let hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
+ }
+
+ if (chroma <= 0) {
+ hue = 0;
+ } else
+ if (max === r) {
+ hue = ((g - b) / chroma) % 6;
+ } else
+ if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma;
+ }
+
+ hue /= 6;
+ hue %= 1;
+
+ return [hue * 360, chroma * 100, grayscale * 100];
+};
+
+convert.hsl.hcg = function (hsl) {
+ const s = hsl[1] / 100;
+ const l = hsl[2] / 100;
+
+ const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
+
+ let f = 0;
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
+ }
+
+ return [hsl[0], c * 100, f * 100];
+};
+
+convert.hsv.hcg = function (hsv) {
+ const s = hsv[1] / 100;
+ const v = hsv[2] / 100;
+
+ const c = s * v;
+ let f = 0;
+
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
+
+ return [hsv[0], c * 100, f * 100];
+};
+
+convert.hcg.rgb = function (hcg) {
+ const h = hcg[0] / 360;
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
+
+ const pure = [0, 0, 0];
+ const hi = (h % 1) * 6;
+ const v = hi % 1;
+ const w = 1 - v;
+ let mg = 0;
+
+ /* eslint-disable max-statements-per-line */
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
+ case 1:
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
+ case 2:
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
+ case 3:
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
+ case 4:
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
+ default:
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
+ }
+ /* eslint-enable max-statements-per-line */
+
+ mg = (1.0 - c) * g;
+
+ return [
+ (c * pure[0] + mg) * 255,
+ (c * pure[1] + mg) * 255,
+ (c * pure[2] + mg) * 255
+ ];
+};
+
+convert.hcg.hsv = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ const v = c + g * (1.0 - c);
+ let f = 0;
+
+ if (v > 0.0) {
+ f = c / v;
+ }
+
+ return [hcg[0], f * 100, v * 100];
+};
+
+convert.hcg.hsl = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ const l = g * (1.0 - c) + 0.5 * c;
+ let s = 0;
+
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else
+ if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
+
+ return [hcg[0], s * 100, l * 100];
+};
+
+convert.hcg.hwb = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+ const v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
+
+convert.hwb.hcg = function (hwb) {
+ const w = hwb[1] / 100;
+ const b = hwb[2] / 100;
+ const v = 1 - b;
+ const c = v - w;
+ let g = 0;
+
+ if (c < 1) {
+ g = (v - c) / (1 - c);
+ }
+
+ return [hwb[0], c * 100, g * 100];
+};
+
+convert.apple.rgb = function (apple) {
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
+};
+
+convert.rgb.apple = function (rgb) {
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
+};
+
+convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
+
+convert.gray.hsl = function (args) {
+ return [0, 0, args[0]];
+};
+
+convert.gray.hsv = convert.gray.hsl;
+
+convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+};
+
+convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+};
+
+convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+};
+
+convert.gray.hex = function (gray) {
+ const val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ const integer = (val << 16) + (val << 8) + val;
+
+ const string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.rgb.gray = function (rgb) {
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+};
diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js
new file mode 100644
index 0000000..b648e57
--- /dev/null
+++ b/node_modules/color-convert/index.js
@@ -0,0 +1,81 @@
+const conversions = require('./conversions');
+const route = require('./route');
+
+const convert = {};
+
+const models = Object.keys(conversions);
+
+function wrapRaw(fn) {
+ const wrappedFn = function (...args) {
+ const arg0 = args[0];
+ if (arg0 === undefined || arg0 === null) {
+ return arg0;
+ }
+
+ if (arg0.length > 1) {
+ args = arg0;
+ }
+
+ return fn(args);
+ };
+
+ // Preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+function wrapRounded(fn) {
+ const wrappedFn = function (...args) {
+ const arg0 = args[0];
+
+ if (arg0 === undefined || arg0 === null) {
+ return arg0;
+ }
+
+ if (arg0.length > 1) {
+ args = arg0;
+ }
+
+ const result = fn(args);
+
+ // We're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
+ if (typeof result === 'object') {
+ for (let len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
+ }
+
+ return result;
+ };
+
+ // Preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+models.forEach(fromModel => {
+ convert[fromModel] = {};
+
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
+
+ const routes = route(fromModel);
+ const routeModels = Object.keys(routes);
+
+ routeModels.forEach(toModel => {
+ const fn = routes[toModel];
+
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
+});
+
+module.exports = convert;
diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json
new file mode 100644
index 0000000..6e48000
--- /dev/null
+++ b/node_modules/color-convert/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "color-convert",
+ "description": "Plain color conversion functions",
+ "version": "2.0.1",
+ "author": "Heather Arthur <fayearthur@gmail.com>",
+ "license": "MIT",
+ "repository": "Qix-/color-convert",
+ "scripts": {
+ "pretest": "xo",
+ "test": "node test/basic.js"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ },
+ "keywords": [
+ "color",
+ "colour",
+ "convert",
+ "converter",
+ "conversion",
+ "rgb",
+ "hsl",
+ "hsv",
+ "hwb",
+ "cmyk",
+ "ansi",
+ "ansi16"
+ ],
+ "files": [
+ "index.js",
+ "conversions.js",
+ "route.js"
+ ],
+ "xo": {
+ "rules": {
+ "default-case": 0,
+ "no-inline-comments": 0,
+ "operator-linebreak": 0
+ }
+ },
+ "devDependencies": {
+ "chalk": "^2.4.2",
+ "xo": "^0.24.0"
+ },
+ "dependencies": {
+ "color-name": "~1.1.4"
+ }
+}
diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js
new file mode 100644
index 0000000..1a08521
--- /dev/null
+++ b/node_modules/color-convert/route.js
@@ -0,0 +1,97 @@
+const conversions = require('./conversions');
+
+/*
+ This function routes a model to all other models.
+
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
+
+ conversions that are not possible simply are not included.
+*/
+
+function buildGraph() {
+ const graph = {};
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ const models = Object.keys(conversions);
+
+ for (let len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ }
+
+ return graph;
+}
+
+// https://en.wikipedia.org/wiki/Breadth-first_search
+function deriveBFS(fromModel) {
+ const graph = buildGraph();
+ const queue = [fromModel]; // Unshift -> queue -> pop
+
+ graph[fromModel].distance = 0;
+
+ while (queue.length) {
+ const current = queue.pop();
+ const adjacents = Object.keys(conversions[current]);
+
+ for (let len = adjacents.length, i = 0; i < len; i++) {
+ const adjacent = adjacents[i];
+ const node = graph[adjacent];
+
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
+ }
+ }
+
+ return graph;
+}
+
+function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+}
+
+function wrapConversion(toModel, graph) {
+ const path = [graph[toModel].parent, toModel];
+ let fn = conversions[graph[toModel].parent][toModel];
+
+ let cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
+ }
+
+ fn.conversion = path;
+ return fn;
+}
+
+module.exports = function (fromModel) {
+ const graph = deriveBFS(fromModel);
+ const conversion = {};
+
+ const models = Object.keys(graph);
+ for (let len = models.length, i = 0; i < len; i++) {
+ const toModel = models[i];
+ const node = graph[toModel];
+
+ if (node.parent === null) {
+ // No possible conversion, or this node is the source model.
+ continue;
+ }
+
+ conversion[toModel] = wrapConversion(toModel, graph);
+ }
+
+ return conversion;
+};
+
diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE
new file mode 100644
index 0000000..c6b1001
--- /dev/null
+++ b/node_modules/color-name/LICENSE
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2015 Dmitry Ivanov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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/color-name/README.md b/node_modules/color-name/README.md
new file mode 100644
index 0000000..932b979
--- /dev/null
+++ b/node_modules/color-name/README.md
@@ -0,0 +1,11 @@
+A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
+
+[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
+
+
+```js
+var colors = require('color-name');
+colors.red //[255,0,0]
+```
+
+<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js
new file mode 100644
index 0000000..b7c198a
--- /dev/null
+++ b/node_modules/color-name/index.js
@@ -0,0 +1,152 @@
+'use strict'
+
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+};
diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json
new file mode 100644
index 0000000..782dd82
--- /dev/null
+++ b/node_modules/color-name/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "color-name",
+ "version": "1.1.4",
+ "description": "A list of color names and its values",
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:colorjs/color-name.git"
+ },
+ "keywords": [
+ "color-name",
+ "color",
+ "color-keyword",
+ "keyword"
+ ],
+ "author": "DY <dfcreative@gmail.com>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/colorjs/color-name/issues"
+ },
+ "homepage": "https://github.com/colorjs/color-name"
+}
diff --git a/node_modules/defaults/LICENSE b/node_modules/defaults/LICENSE
new file mode 100644
index 0000000..11eb6fd
--- /dev/null
+++ b/node_modules/defaults/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2022 Sindre Sorhus
+Copyright (c) 2015 Elijah Insua
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 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/defaults/README.md b/node_modules/defaults/README.md
new file mode 100644
index 0000000..12bf91f
--- /dev/null
+++ b/node_modules/defaults/README.md
@@ -0,0 +1,39 @@
+# defaults
+
+> A simple one level options merge utility
+
+## Install
+
+```sh
+npm install defaults
+```
+
+## Usage
+
+```js
+const defaults = require('defaults');
+
+const handle = (options, fn) => {
+ options = defaults(options, {
+ timeout: 100
+ });
+
+ setTimeout(() => {
+ fn(options);
+ }, options.timeout);
+}
+
+handle({timeout: 1000}, () => {
+ // We're here 1000 ms later
+});
+
+handle({timeout: 10000}, () => {
+ // We're here 10s later
+});
+```
+
+## Summary
+
+this module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults`
+
+Sidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto.
diff --git a/node_modules/defaults/index.js b/node_modules/defaults/index.js
new file mode 100644
index 0000000..cb7d75c
--- /dev/null
+++ b/node_modules/defaults/index.js
@@ -0,0 +1,13 @@
+var clone = require('clone');
+
+module.exports = function(options, defaults) {
+ options = options || {};
+
+ Object.keys(defaults).forEach(function(key) {
+ if (typeof options[key] === 'undefined') {
+ options[key] = clone(defaults[key]);
+ }
+ });
+
+ return options;
+}; \ No newline at end of file
diff --git a/node_modules/defaults/package.json b/node_modules/defaults/package.json
new file mode 100644
index 0000000..44f72b1
--- /dev/null
+++ b/node_modules/defaults/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "defaults",
+ "version": "1.0.4",
+ "description": "merge single level defaults over a config object",
+ "main": "index.js",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/sindresorhus/node-defaults.git"
+ },
+ "keywords": [
+ "config",
+ "defaults",
+ "options",
+ "object",
+ "merge",
+ "assign",
+ "properties",
+ "deep"
+ ],
+ "author": "Elijah Insua <tmpvar@gmail.com>",
+ "license": "MIT",
+ "readmeFilename": "README.md",
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "devDependencies": {
+ "tap": "^2.0.0"
+ }
+}
diff --git a/node_modules/defaults/test.js b/node_modules/defaults/test.js
new file mode 100644
index 0000000..60e0ffb
--- /dev/null
+++ b/node_modules/defaults/test.js
@@ -0,0 +1,34 @@
+var defaults = require('./'),
+ test = require('tap').test;
+
+test("ensure options is an object", function(t) {
+ var options = defaults(false, { a : true });
+ t.ok(options.a);
+ t.end()
+});
+
+test("ensure defaults override keys", function(t) {
+ var result = defaults({}, { a: false, b: true });
+ t.ok(result.b, 'b merges over undefined');
+ t.equal(result.a, false, 'a merges over undefined');
+ t.end();
+});
+
+test("ensure defined keys are not overwritten", function(t) {
+ var result = defaults({ b: false }, { a: false, b: true });
+ t.equal(result.b, false, 'b not merged');
+ t.equal(result.a, false, 'a merges over undefined');
+ t.end();
+});
+
+test("ensure defaults clone nested objects", function(t) {
+ var d = { a: [1,2,3], b: { hello : 'world' } };
+ var result = defaults({}, d);
+ t.equal(result.a.length, 3, 'objects should be clones');
+ t.ok(result.a !== d.a, 'objects should be clones');
+
+ t.equal(Object.keys(result.b).length, 1, 'objects should be clones');
+ t.ok(result.b !== d.b, 'objects should be clones');
+ t.end();
+});
+
diff --git a/node_modules/has-flag/index.d.ts b/node_modules/has-flag/index.d.ts
new file mode 100644
index 0000000..a0a48c8
--- /dev/null
+++ b/node_modules/has-flag/index.d.ts
@@ -0,0 +1,39 @@
+/**
+Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
+
+@param flag - CLI flag to look for. The `--` prefix is optional.
+@param argv - CLI arguments. Default: `process.argv`.
+@returns Whether the flag exists.
+
+@example
+```
+// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow
+
+// foo.ts
+import hasFlag = require('has-flag');
+
+hasFlag('unicorn');
+//=> true
+
+hasFlag('--unicorn');
+//=> true
+
+hasFlag('f');
+//=> true
+
+hasFlag('-f');
+//=> true
+
+hasFlag('foo=bar');
+//=> true
+
+hasFlag('foo');
+//=> false
+
+hasFlag('rainbow');
+//=> false
+```
+*/
+declare function hasFlag(flag: string, argv?: string[]): boolean;
+
+export = hasFlag;
diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js
new file mode 100644
index 0000000..b6f80b1
--- /dev/null
+++ b/node_modules/has-flag/index.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = (flag, argv = process.argv) => {
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const position = argv.indexOf(prefix + flag);
+ const terminatorPosition = argv.indexOf('--');
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
+};
diff --git a/node_modules/has-flag/license b/node_modules/has-flag/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/has-flag/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/has-flag/package.json b/node_modules/has-flag/package.json
new file mode 100644
index 0000000..a9cba4b
--- /dev/null
+++ b/node_modules/has-flag/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "has-flag",
+ "version": "4.0.0",
+ "description": "Check if argv has a specific flag",
+ "license": "MIT",
+ "repository": "sindresorhus/has-flag",
+ "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": [
+ "has",
+ "check",
+ "detect",
+ "contains",
+ "find",
+ "flag",
+ "cli",
+ "command-line",
+ "argv",
+ "process",
+ "arg",
+ "args",
+ "argument",
+ "arguments",
+ "getopt",
+ "minimist",
+ "optimist"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md
new file mode 100644
index 0000000..3f72dff
--- /dev/null
+++ b/node_modules/has-flag/readme.md
@@ -0,0 +1,89 @@
+# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
+
+> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
+
+Correctly stops looking after an `--` argument terminator.
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&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>
+
+---
+
+
+## Install
+
+```
+$ npm install has-flag
+```
+
+
+## Usage
+
+```js
+// foo.js
+const hasFlag = require('has-flag');
+
+hasFlag('unicorn');
+//=> true
+
+hasFlag('--unicorn');
+//=> true
+
+hasFlag('f');
+//=> true
+
+hasFlag('-f');
+//=> true
+
+hasFlag('foo=bar');
+//=> true
+
+hasFlag('foo');
+//=> false
+
+hasFlag('rainbow');
+//=> false
+```
+
+```
+$ node foo.js -f --unicorn --foo=bar -- --rainbow
+```
+
+
+## API
+
+### hasFlag(flag, [argv])
+
+Returns a boolean for whether the flag exists.
+
+#### flag
+
+Type: `string`
+
+CLI flag to look for. The `--` prefix is optional.
+
+#### argv
+
+Type: `string[]`<br>
+Default: `process.argv`
+
+CLI arguments.
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/ieee754/LICENSE b/node_modules/ieee754/LICENSE
new file mode 100644
index 0000000..5aac82c
--- /dev/null
+++ b/node_modules/ieee754/LICENSE
@@ -0,0 +1,11 @@
+Copyright 2008 Fair Oaks Labs, 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 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/ieee754/README.md b/node_modules/ieee754/README.md
new file mode 100644
index 0000000..cb7527b
--- /dev/null
+++ b/node_modules/ieee754/README.md
@@ -0,0 +1,51 @@
+# ieee754 [![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/ieee754/master.svg
+[travis-url]: https://travis-ci.org/feross/ieee754
+[npm-image]: https://img.shields.io/npm/v/ieee754.svg
+[npm-url]: https://npmjs.org/package/ieee754
+[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg
+[downloads-url]: https://npmjs.org/package/ieee754
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg
+[saucelabs-url]: https://saucelabs.com/u/ieee754
+
+### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.
+
+## install
+
+```
+npm install ieee754
+```
+
+## methods
+
+`var ieee754 = require('ieee754')`
+
+The `ieee754` object has the following functions:
+
+```
+ieee754.read = function (buffer, offset, isLE, mLen, nBytes)
+ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes)
+```
+
+The arguments mean the following:
+
+- buffer = the buffer
+- offset = offset into the buffer
+- value = value to set (only for `write`)
+- isLe = is little endian?
+- mLen = mantissa length
+- nBytes = number of bytes
+
+## what is ieee754?
+
+The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point).
+
+## license
+
+BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.
diff --git a/node_modules/ieee754/index.d.ts b/node_modules/ieee754/index.d.ts
new file mode 100644
index 0000000..f1e4354
--- /dev/null
+++ b/node_modules/ieee754/index.d.ts
@@ -0,0 +1,10 @@
+declare namespace ieee754 {
+ export function read(
+ buffer: Uint8Array, offset: number, isLE: boolean, mLen: number,
+ nBytes: number): number;
+ export function write(
+ buffer: Uint8Array, value: number, offset: number, isLE: boolean,
+ mLen: number, nBytes: number): void;
+ }
+
+ export = ieee754; \ No newline at end of file
diff --git a/node_modules/ieee754/index.js b/node_modules/ieee754/index.js
new file mode 100644
index 0000000..81d26c3
--- /dev/null
+++ b/node_modules/ieee754/index.js
@@ -0,0 +1,85 @@
+/*! 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
+}
diff --git a/node_modules/ieee754/package.json b/node_modules/ieee754/package.json
new file mode 100644
index 0000000..7b23851
--- /dev/null
+++ b/node_modules/ieee754/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "ieee754",
+ "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object",
+ "version": "1.2.1",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "https://feross.org"
+ },
+ "contributors": [
+ "Romain Beauxis <toots@rastageeks.org>"
+ ],
+ "devDependencies": {
+ "airtap": "^3.0.0",
+ "standard": "*",
+ "tape": "^5.0.1"
+ },
+ "keywords": [
+ "IEEE 754",
+ "buffer",
+ "convert",
+ "floating point",
+ "ieee754"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/ieee754.git"
+ },
+ "scripts": {
+ "test": "standard && npm run test-node && npm run test-browser",
+ "test-browser": "airtap -- test/*.js",
+ "test-browser-local": "airtap --local -- test/*.js",
+ "test-node": "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/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/is-interactive/index.d.ts b/node_modules/is-interactive/index.d.ts
new file mode 100644
index 0000000..bf96f71
--- /dev/null
+++ b/node_modules/is-interactive/index.d.ts
@@ -0,0 +1,25 @@
+export interface Options {
+ /**
+ The stream to check.
+
+ @default process.stdout
+ */
+ readonly stream?: NodeJS.WritableStream;
+}
+
+/**
+Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678).
+
+It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
+
+This can be useful to decide whether to present interactive UI or animations in the terminal.
+
+@example
+```
+import isInteractive from 'is-interactive';
+
+isInteractive();
+//=> true
+```
+*/
+export default function isInteractive(options?: Options): boolean;
diff --git a/node_modules/is-interactive/index.js b/node_modules/is-interactive/index.js
new file mode 100644
index 0000000..a9ce8c7
--- /dev/null
+++ b/node_modules/is-interactive/index.js
@@ -0,0 +1,7 @@
+export default function isInteractive({stream = process.stdout} = {}) {
+ return Boolean(
+ stream && stream.isTTY &&
+ process.env.TERM !== 'dumb' &&
+ !('CI' in process.env)
+ );
+}
diff --git a/node_modules/is-interactive/license b/node_modules/is-interactive/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/is-interactive/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-interactive/package.json b/node_modules/is-interactive/package.json
new file mode 100644
index 0000000..9dec5ce
--- /dev/null
+++ b/node_modules/is-interactive/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "is-interactive",
+ "version": "2.0.0",
+ "description": "Check if stdout or stderr is interactive",
+ "license": "MIT",
+ "repository": "sindresorhus/is-interactive",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": ">=12"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "interactive",
+ "stdout",
+ "stderr",
+ "detect",
+ "is",
+ "terminal",
+ "shell",
+ "tty"
+ ],
+ "devDependencies": {
+ "@types/node": "^15.0.1",
+ "ava": "^3.15.0",
+ "tsd": "^0.14.0",
+ "xo": "^0.39.1"
+ }
+}
diff --git a/node_modules/is-interactive/readme.md b/node_modules/is-interactive/readme.md
new file mode 100644
index 0000000..15d2645
--- /dev/null
+++ b/node_modules/is-interactive/readme.md
@@ -0,0 +1,52 @@
+# is-interactive
+
+> Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678)
+
+It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
+
+This can be useful to decide whether to present interactive UI or animations in the terminal.
+
+## Install
+
+```
+$ npm install is-interactive
+```
+
+## Usage
+
+```js
+import isInteractive from 'is-interactive';
+
+isInteractive();
+//=> true
+```
+
+## API
+
+### isInteractive(options?)
+
+#### options
+
+Type: `object`
+
+##### stream
+
+Type: [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable)\
+Default: [`process.stdout`](https://nodejs.org/api/process.html#process_process_stdout)
+
+The stream to check.
+
+## FAQ
+
+#### Why are you not using [`ci-info`](https://github.com/watson/ci-info) for the CI check?
+
+It's silly to have to detect individual CIs. They should identify themselves with the `CI` environment variable, and most do just that. A manually maintained list of detections will easily get out of date. And if a package using `ci-info` doesn't update to the latest version all the time, they will not support certain CIs. It also creates unpredictability as you might assume a CI is not supported and then suddenly it gets supported and you didn't account for that. In addition, some of the manual detections are loose and might cause false-positives which could create hard-to-debug bugs.
+
+#### Why does this even exist? It's just a few lines.
+
+It's not about the number of lines, but rather discoverability and documentation. A lot of people wouldn't even know they need this. Feel free to copy-paste the code if you don't want the dependency. You might also want to read [this blog post](https://blog.sindresorhus.com/small-focused-modules-9238d977a92a).
+
+## Related
+
+- [is-unicode-supported](https://github.com/sindresorhus/is-unicode-supported) - Detect whether the terminal supports Unicode
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
diff --git a/node_modules/is-unicode-supported/index.d.ts b/node_modules/is-unicode-supported/index.d.ts
new file mode 100644
index 0000000..944a878
--- /dev/null
+++ b/node_modules/is-unicode-supported/index.d.ts
@@ -0,0 +1,12 @@
+/**
+Detect whether the terminal supports Unicode.
+
+@example
+```
+import isUnicodeSupported from 'is-unicode-supported';
+
+isUnicodeSupported();
+//=> true
+```
+*/
+export default function isUnicodeSupported(): boolean;
diff --git a/node_modules/is-unicode-supported/index.js b/node_modules/is-unicode-supported/index.js
new file mode 100644
index 0000000..d3938c5
--- /dev/null
+++ b/node_modules/is-unicode-supported/index.js
@@ -0,0 +1,17 @@
+import process from 'node:process';
+
+export default function isUnicodeSupported() {
+ if (process.platform !== 'win32') {
+ return process.env.TERM !== 'linux'; // Linux console (kernel)
+ }
+
+ return Boolean(process.env.CI)
+ || Boolean(process.env.WT_SESSION) // Windows Terminal
+ || Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
+ || process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
+ || process.env.TERM_PROGRAM === 'Terminus-Sublime'
+ || process.env.TERM_PROGRAM === 'vscode'
+ || process.env.TERM === 'xterm-256color'
+ || process.env.TERM === 'alacritty'
+ || process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
+}
diff --git a/node_modules/is-unicode-supported/license b/node_modules/is-unicode-supported/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/is-unicode-supported/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-unicode-supported/package.json b/node_modules/is-unicode-supported/package.json
new file mode 100644
index 0000000..072651f
--- /dev/null
+++ b/node_modules/is-unicode-supported/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "is-unicode-supported",
+ "version": "1.3.0",
+ "description": "Detect whether the terminal supports Unicode",
+ "license": "MIT",
+ "repository": "sindresorhus/is-unicode-supported",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": ">=12"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "terminal",
+ "unicode",
+ "detect",
+ "utf8",
+ "console",
+ "shell",
+ "support",
+ "supports",
+ "supported",
+ "check",
+ "detection"
+ ],
+ "devDependencies": {
+ "ava": "^4.0.1",
+ "tsd": "^0.19.1",
+ "xo": "^0.47.0"
+ }
+}
diff --git a/node_modules/is-unicode-supported/readme.md b/node_modules/is-unicode-supported/readme.md
new file mode 100644
index 0000000..e1954ec
--- /dev/null
+++ b/node_modules/is-unicode-supported/readme.md
@@ -0,0 +1,35 @@
+# is-unicode-supported
+
+> Detect whether the terminal supports Unicode
+
+This can be useful to decide whether to use Unicode characters or fallback ASCII characters in command-line output.
+
+Note that the check is quite naive. It just assumes all non-Windows terminals support Unicode and hard-codes which Windows terminals that do support Unicode. However, I have been using this logic in some popular packages for years without problems.
+
+## Install
+
+```sh
+npm install is-unicode-supported
+```
+
+## Usage
+
+```js
+import isUnicodeSupported from 'is-unicode-supported';
+
+isUnicodeSupported();
+//=> true
+```
+
+## API
+
+### isUnicodeSupported()
+
+Returns a `boolean` for whether the terminal supports Unicode.
+
+## Related
+
+- [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows fallbacks
+- [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
diff --git a/node_modules/kleur/index.js b/node_modules/kleur/index.js
new file mode 100644
index 0000000..0bc6ec9
--- /dev/null
+++ b/node_modules/kleur/index.js
@@ -0,0 +1,104 @@
+'use strict';
+
+const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
+
+const $ = {
+ enabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && FORCE_COLOR !== '0',
+
+ // modifiers
+ reset: init(0, 0),
+ bold: init(1, 22),
+ dim: init(2, 22),
+ italic: init(3, 23),
+ underline: init(4, 24),
+ inverse: init(7, 27),
+ hidden: init(8, 28),
+ strikethrough: init(9, 29),
+
+ // colors
+ black: init(30, 39),
+ red: init(31, 39),
+ green: init(32, 39),
+ yellow: init(33, 39),
+ blue: init(34, 39),
+ magenta: init(35, 39),
+ cyan: init(36, 39),
+ white: init(37, 39),
+ gray: init(90, 39),
+ grey: init(90, 39),
+
+ // background colors
+ bgBlack: init(40, 49),
+ bgRed: init(41, 49),
+ bgGreen: init(42, 49),
+ bgYellow: init(43, 49),
+ bgBlue: init(44, 49),
+ bgMagenta: init(45, 49),
+ bgCyan: init(46, 49),
+ bgWhite: init(47, 49)
+};
+
+function run(arr, str) {
+ let i=0, tmp, beg='', end='';
+ for (; i < arr.length; i++) {
+ tmp = arr[i];
+ beg += tmp.open;
+ end += tmp.close;
+ if (str.includes(tmp.close)) {
+ str = str.replace(tmp.rgx, tmp.close + tmp.open);
+ }
+ }
+ return beg + str + end;
+}
+
+function chain(has, keys) {
+ let ctx = { has, keys };
+
+ ctx.reset = $.reset.bind(ctx);
+ ctx.bold = $.bold.bind(ctx);
+ ctx.dim = $.dim.bind(ctx);
+ ctx.italic = $.italic.bind(ctx);
+ ctx.underline = $.underline.bind(ctx);
+ ctx.inverse = $.inverse.bind(ctx);
+ ctx.hidden = $.hidden.bind(ctx);
+ ctx.strikethrough = $.strikethrough.bind(ctx);
+
+ ctx.black = $.black.bind(ctx);
+ ctx.red = $.red.bind(ctx);
+ ctx.green = $.green.bind(ctx);
+ ctx.yellow = $.yellow.bind(ctx);
+ ctx.blue = $.blue.bind(ctx);
+ ctx.magenta = $.magenta.bind(ctx);
+ ctx.cyan = $.cyan.bind(ctx);
+ ctx.white = $.white.bind(ctx);
+ ctx.gray = $.gray.bind(ctx);
+ ctx.grey = $.grey.bind(ctx);
+
+ ctx.bgBlack = $.bgBlack.bind(ctx);
+ ctx.bgRed = $.bgRed.bind(ctx);
+ ctx.bgGreen = $.bgGreen.bind(ctx);
+ ctx.bgYellow = $.bgYellow.bind(ctx);
+ ctx.bgBlue = $.bgBlue.bind(ctx);
+ ctx.bgMagenta = $.bgMagenta.bind(ctx);
+ ctx.bgCyan = $.bgCyan.bind(ctx);
+ ctx.bgWhite = $.bgWhite.bind(ctx);
+
+ return ctx;
+}
+
+function init(open, close) {
+ let blk = {
+ open: `\x1b[${open}m`,
+ close: `\x1b[${close}m`,
+ rgx: new RegExp(`\\x1b\\[${close}m`, 'g')
+ };
+ return function (txt) {
+ if (this !== void 0 && this.has !== void 0) {
+ this.has.includes(open) || (this.has.push(open),this.keys.push(blk));
+ return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+'';
+ }
+ return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+'';
+ };
+}
+
+module.exports = $;
diff --git a/node_modules/kleur/kleur.d.ts b/node_modules/kleur/kleur.d.ts
new file mode 100644
index 0000000..fdc26ca
--- /dev/null
+++ b/node_modules/kleur/kleur.d.ts
@@ -0,0 +1,45 @@
+// Originally by: Rogier Schouten <https://github.com/rogierschouten>
+// Adapted by: Madhav Varshney <https://github.com/madhavarshney>
+declare namespace kleur {
+ interface Color {
+ (x: string | number): string;
+ (): Kleur;
+ }
+
+ interface Kleur {
+ // Colors
+ black: Color;
+ red: Color;
+ green: Color;
+ yellow: Color;
+ blue: Color;
+ magenta: Color;
+ cyan: Color;
+ white: Color;
+ gray: Color;
+ grey: Color;
+
+ // Backgrounds
+ bgBlack: Color;
+ bgRed: Color;
+ bgGreen: Color;
+ bgYellow: Color;
+ bgBlue: Color;
+ bgMagenta: Color;
+ bgCyan: Color;
+ bgWhite: Color;
+
+ // Modifiers
+ reset: Color;
+ bold: Color;
+ dim: Color;
+ italic: Color;
+ underline: Color;
+ inverse: Color;
+ hidden: Color;
+ strikethrough: Color;
+ }
+}
+
+declare let kleur: kleur.Kleur & { enabled: boolean };
+export = kleur;
diff --git a/node_modules/kleur/license b/node_modules/kleur/license
new file mode 100644
index 0000000..a3f96f8
--- /dev/null
+++ b/node_modules/kleur/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.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/kleur/package.json b/node_modules/kleur/package.json
new file mode 100644
index 0000000..a81931e
--- /dev/null
+++ b/node_modules/kleur/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "kleur",
+ "version": "3.0.3",
+ "repository": "lukeed/kleur",
+ "description": "The fastest Node.js library for formatting terminal text with ANSI colors~!",
+ "license": "MIT",
+ "files": [
+ "*.js",
+ "*.d.ts"
+ ],
+ "author": {
+ "name": "Luke Edwards",
+ "email": "luke.edwards05@gmail.com",
+ "url": "lukeed.com"
+ },
+ "scripts": {
+ "test": "tape test/*.js | tap-spec"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "keywords": [
+ "ansi",
+ "cli",
+ "color",
+ "colors",
+ "console",
+ "terminal"
+ ],
+ "types": "kleur.d.ts",
+ "devDependencies": {
+ "tap-spec": "^5.0.0",
+ "tape": "^4.9.1"
+ }
+}
diff --git a/node_modules/kleur/readme.md b/node_modules/kleur/readme.md
new file mode 100644
index 0000000..6926f1e
--- /dev/null
+++ b/node_modules/kleur/readme.md
@@ -0,0 +1,172 @@
+<div align="center">
+ <img src="shots/logo.png" alt="kleur" height="120" />
+</div>
+
+<div align="center">
+ <a href="https://npmjs.org/package/kleur">
+ <img src="https://badgen.now.sh/npm/v/kleur" alt="version" />
+ </a>
+ <a href="https://travis-ci.org/lukeed/kleur">
+ <img src="https://badgen.now.sh/travis/lukeed/kleur" alt="travis" />
+ </a>
+ <a href="https://npmjs.org/package/kleur">
+ <img src="https://badgen.now.sh/npm/dm/kleur" alt="downloads" />
+ </a>
+ <a href="https://packagephobia.now.sh/result?p=kleur">
+ <img src="https://packagephobia.now.sh/badge?p=kleur" alt="install size" />
+ </a>
+</div>
+
+<div align="center">The fastest Node.js library for formatting terminal text with ANSI colors~!</div>
+
+## Features
+
+* No dependencies
+* Super [lightweight](#load-time) & [performant](#performance)
+* Supports [nested](#nested-methods) & [chained](#chained-methods) colors
+* No `String.prototype` modifications
+* Conditional [color support](#conditional-support)
+* Familiar [API](#api)
+
+---
+
+As of `v3.0` the Chalk-style syntax (magical getter) is no longer used.<br>If you need or require that syntax, consider using [`ansi-colors`](https://github.com/doowb/ansi-colors), which maintains `chalk` parity.
+
+---
+
+
+## Install
+
+```
+$ npm install --save kleur
+```
+
+
+## Usage
+
+```js
+const { red, white, blue, bold } = require('kleur');
+
+// basic usage
+red('red text');
+
+// chained methods
+blue().bold().underline('howdy partner');
+
+// nested methods
+bold(`${ white().bgRed('[ERROR]') } ${ red().italic('Something happened')}`);
+```
+
+### Chained Methods
+
+```js
+console.log(bold().red('this is a bold red message'));
+console.log(bold().italic('this is a bold italicized message'));
+console.log(bold().yellow().bgRed().italic('this is a bold yellow italicized message'));
+console.log(green().bold().underline('this is a bold green underlined message'));
+```
+
+<img src="shots/1.png" width="300" />
+
+### Nested Methods
+
+```js
+const { yellow, red, cyan } = require('kleur');
+
+console.log(yellow(`foo ${red().bold('red')} bar ${cyan('cyan')} baz`));
+console.log(yellow('foo ' + red().bold('red') + ' bar ' + cyan('cyan') + ' baz'));
+```
+
+<img src="shots/2.png" width="300" />
+
+
+### Conditional Support
+
+Toggle color support as needed; `kleur` includes simple auto-detection which may not cover all cases.
+
+```js
+const kleur = require('kleur');
+
+// manually disable
+kleur.enabled = false;
+
+// or use another library to detect support
+kleur.enabled = require('color-support').level;
+
+console.log(kleur.red('I will only be colored red if the terminal supports colors'));
+```
+
+
+## API
+
+Any `kleur` method returns a `String` when invoked with input; otherwise chaining is expected.
+
+> It's up to the developer to pass the output to destinations like `console.log`, `process.stdout.write`, etc.
+
+The methods below are grouped by type for legibility purposes only. They each can be [chained](#chained-methods) or [nested](#nested-methods) with one another.
+
+***Colors:***
+> black &mdash; red &mdash; green &mdash; yellow &mdash; blue &mdash; magenta &mdash; cyan &mdash; white &mdash; gray &mdash; grey
+
+***Backgrounds:***
+> bgBlack &mdash; bgRed &mdash; bgGreen &mdash; bgYellow &mdash; bgBlue &mdash; bgMagenta &mdash; bgCyan &mdash; bgWhite
+
+***Modifiers:***
+> reset &mdash; bold &mdash; dim &mdash; italic* &mdash; underline &mdash; inverse &mdash; hidden &mdash; strikethrough*
+
+<sup>* <em>Not widely supported</em></sup>
+
+
+## Benchmarks
+
+> Using Node v10.13.0
+
+### Load time
+
+```
+chalk :: 14.543ms
+kleur :: 0.474ms
+ansi-colors :: 1.923ms
+```
+
+### Performance
+
+```
+# All Colors
+ ansi-colors x 199,381 ops/sec ±1.04% (96 runs sampled)
+ chalk x 12,107 ops/sec ±2.07% (87 runs sampled)
+ kleur x 715,334 ops/sec ±0.30% (93 runs sampled)
+
+# Stacked colors
+ ansi-colors x 24,494 ops/sec ±1.03% (93 runs sampled)
+ chalk x 2,650 ops/sec ±2.06% (85 runs sampled)
+ kleur x 75,798 ops/sec ±0.19% (97 runs sampled)
+
+# Nested colors
+ ansi-colors x 77,766 ops/sec ±0.32% (94 runs sampled)
+ chalk x 5,596 ops/sec ±1.85% (86 runs sampled)
+ kleur x 137,660 ops/sec ±0.31% (93 runs sampled)
+```
+
+
+## Credits
+
+This project originally forked [Brian Woodward](https://github.com/doowb)'s awesome [`ansi-colors`](https://github.com/doowb/ansi-colors) library.
+
+Beginning with `kleur@3.0`, the Chalk-style syntax (magical getter) has been replaced with function calls per key:
+
+```js
+// Old:
+c.red.bold.underline('old');
+
+// New:
+c.red().bold().underline('new');
+```
+> <sup><em>As I work more with Rust, the newer syntax feels so much better & more natural!</em></sup>
+
+If you prefer the old syntax, you may migrate to `ansi-colors`. Versions below `kleur@3.0` have been deprecated.
+
+
+## License
+
+MIT © [Luke Edwards](https://lukeed.com)
diff --git a/node_modules/log-symbols/browser.js b/node_modules/log-symbols/browser.js
new file mode 100644
index 0000000..9bcecee
--- /dev/null
+++ b/node_modules/log-symbols/browser.js
@@ -0,0 +1,8 @@
+const logSymbols = {
+ info: 'ℹ️',
+ success: '✅',
+ warning: '⚠️',
+ error: '❌️',
+};
+
+export default logSymbols;
diff --git a/node_modules/log-symbols/index.d.ts b/node_modules/log-symbols/index.d.ts
new file mode 100644
index 0000000..8490570
--- /dev/null
+++ b/node_modules/log-symbols/index.d.ts
@@ -0,0 +1,22 @@
+/**
+Colored symbols for various log levels.
+
+Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
+
+@example
+```
+import logSymbols from 'log-symbols';
+
+console.log(logSymbols.success, 'Finished successfully!');
+// Terminals with Unicode support: ✔ Finished successfully!
+// Terminals without Unicode support: √ Finished successfully!
+```
+*/
+declare const logSymbols: {
+ readonly info: string;
+ readonly success: string;
+ readonly warning: string;
+ readonly error: string;
+};
+
+export default logSymbols;
diff --git a/node_modules/log-symbols/index.js b/node_modules/log-symbols/index.js
new file mode 100644
index 0000000..2c82c0c
--- /dev/null
+++ b/node_modules/log-symbols/index.js
@@ -0,0 +1,20 @@
+import chalk from 'chalk';
+import isUnicodeSupported from 'is-unicode-supported';
+
+const main = {
+ info: chalk.blue('ℹ'),
+ success: chalk.green('✔'),
+ warning: chalk.yellow('⚠'),
+ error: chalk.red('✖'),
+};
+
+const fallback = {
+ info: chalk.blue('i'),
+ success: chalk.green('√'),
+ warning: chalk.yellow('‼'),
+ error: chalk.red('×'),
+};
+
+const logSymbols = isUnicodeSupported() ? main : fallback;
+
+export default logSymbols;
diff --git a/node_modules/log-symbols/license b/node_modules/log-symbols/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/log-symbols/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/log-symbols/node_modules/chalk/license b/node_modules/log-symbols/node_modules/chalk/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/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/log-symbols/node_modules/chalk/package.json b/node_modules/log-symbols/node_modules/chalk/package.json
new file mode 100644
index 0000000..ddcf758
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/package.json
@@ -0,0 +1,81 @@
+{
+ "name": "chalk",
+ "version": "5.2.0",
+ "description": "Terminal string styling done right",
+ "license": "MIT",
+ "repository": "chalk/chalk",
+ "funding": "https://github.com/chalk/chalk?sponsor=1",
+ "type": "module",
+ "main": "./source/index.js",
+ "exports": "./source/index.js",
+ "imports": {
+ "#ansi-styles": "./source/vendor/ansi-styles/index.js",
+ "#supports-color": {
+ "node": "./source/vendor/supports-color/index.js",
+ "default": "./source/vendor/supports-color/browser.js"
+ }
+ },
+ "types": "./source/index.d.ts",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "scripts": {
+ "test": "xo && c8 ava && tsd",
+ "bench": "matcha benchmark.js"
+ },
+ "files": [
+ "source",
+ "!source/index.test-d.ts"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "devDependencies": {
+ "@types/node": "^16.11.10",
+ "ava": "^3.15.0",
+ "c8": "^7.10.0",
+ "color-convert": "^2.0.1",
+ "execa": "^6.0.0",
+ "log-update": "^5.0.0",
+ "matcha": "^0.7.0",
+ "tsd": "^0.19.0",
+ "xo": "^0.53.0",
+ "yoctodelay": "^2.0.0"
+ },
+ "xo": {
+ "rules": {
+ "unicorn/prefer-string-slice": "off",
+ "@typescript-eslint/consistent-type-imports": "off",
+ "@typescript-eslint/consistent-type-exports": "off",
+ "@typescript-eslint/consistent-type-definitions": "off"
+ }
+ },
+ "c8": {
+ "reporter": [
+ "text",
+ "lcov"
+ ],
+ "exclude": [
+ "source/vendor"
+ ]
+ }
+}
diff --git a/node_modules/log-symbols/node_modules/chalk/readme.md b/node_modules/log-symbols/node_modules/chalk/readme.md
new file mode 100644
index 0000000..93511c0
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/readme.md
@@ -0,0 +1,325 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="320" src="media/logo.svg" alt="Chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[![Coverage Status](https://codecov.io/gh/chalk/chalk/branch/main/graph/badge.svg)](https://codecov.io/gh/chalk/chalk)
+[![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents)
+[![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk)
+[![run on repl.it](https://img.shields.io/badge/Run_on_Replit-f26207?logo=replit&logoColor=white)](https://repl.it/github/chalk/chalk)
+
+![](media/screenshot.png)
+
+<br>
+
+---
+
+<div align="center">
+ <p>
+ <p>
+ <sup>
+ Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a>
+ </sup>
+ </p>
+ <sup>Special thanks to:</sup>
+ <br>
+ <br>
+ <a href="https://standardresume.co/tech">
+ <img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160">
+ </a>
+ <br>
+ <br>
+ <a href="https://retool.com/?utm_campaign=sindresorhus">
+ <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230">
+ </a>
+ <br>
+ <br>
+ <a href="https://strapi.io/?ref=sindresorhus">
+ <div>
+ <img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="220" alt="Strapi">
+ </div>
+ <b>Strapi is the leading open-source headless CMS.</b>
+ <div>
+ <sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
+ </div>
+ </a>
+ <br>
+ <br>
+ <a href="https://www.stackaid.us/?utm_campaign=sindre">
+ <div>
+ <img src="https://sindresorhus.com/assets/thanks/stackaid-logo.png" width="230" alt="StackAid">
+ </div>
+ <b>Fund your open source dependencies</b>
+ </a>
+ <br>
+ <br>
+ </p>
+</div>
+
+---
+
+<br>
+
+## Highlights
+
+- Expressive API
+- Highly performant
+- No dependencies
+- Ability to nest styles
+- [256/Truecolor color support](#256-and-truecolor-color-support)
+- Auto-detects color support
+- Doesn't extend `String.prototype`
+- Clean and focused
+- Actively maintained
+- [Used by ~86,000 packages](https://www.npmjs.com/browse/depended/chalk) as of October 4, 2022
+
+## Install
+
+```sh
+npm install chalk
+```
+
+**IMPORTANT:** Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. [Read more.](https://github.com/chalk/chalk/releases/tag/v5.0.0)
+
+## Usage
+
+```js
+import chalk from 'chalk';
+
+console.log(chalk.blue('Hello world!'));
+```
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+import chalk from 'chalk';
+
+const log = console.log;
+
+// Combine styled and normal strings
+log(chalk.blue('Hello') + ' World' + chalk.red('!'));
+
+// Compose multiple styles using the chainable API
+log(chalk.blue.bgRed.bold('Hello world!'));
+
+// Pass in multiple arguments
+log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
+
+// Nest styles
+log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
+
+// Nest styles of the same type even (color, underline, background)
+log(chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+));
+
+// ES2015 template literal
+log(`
+CPU: ${chalk.red('90%')}
+RAM: ${chalk.green('40%')}
+DISK: ${chalk.yellow('70%')}
+`);
+
+// Use RGB colors in terminal emulators that support it.
+log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
+log(chalk.hex('#DEADED').bold('Bold gray!'));
+```
+
+Easily define your own themes:
+
+```js
+import chalk from 'chalk';
+
+const error = chalk.bold.red;
+const warning = chalk.hex('#FFA500'); // Orange color
+
+console.log(error('Error!'));
+console.log(warning('Warning!'));
+```
+
+Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
+
+```js
+import chalk from 'chalk';
+
+const name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> 'Hello Sindre'
+```
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.level
+
+Specifies the level of color support.
+
+Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+import {Chalk} from 'chalk';
+
+const customChalk = new Chalk({level: 0});
+```
+
+| Level | Description |
+| :---: | :--- |
+| `0` | All colors disabled |
+| `1` | Basic color support (16 colors) |
+| `2` | 256 color support |
+| `3` | Truecolor support (16 million colors) |
+
+### supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+### chalkStderr and supportsColorStderr
+
+`chalkStderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `supportsColor` apply to this too. `supportsColorStderr` is exposed for convenience.
+
+### modifierNames, foregroundColorNames, backgroundColorNames, and colorNames
+
+All supported style strings are exposed as an array of strings for convenience. `colorNames` is the combination of `foregroundColorNames` and `backgroundColorNames`.
+
+This can be useful if you wrap Chalk and need to validate input:
+
+```js
+import {modifierNames, foregroundColorNames} from 'chalk';
+
+console.log(modifierNames.includes('bold'));
+//=> true
+
+console.log(foregroundColorNames.includes('pink'));
+//=> false
+```
+
+## Styles
+
+### Modifiers
+
+- `reset` - Reset the current style.
+- `bold` - Make the text bold.
+- `dim` - Make the text have lower opacity.
+- `italic` - Make the text italic. *(Not widely supported)*
+- `underline` - Put a horizontal line below the text. *(Not widely supported)*
+- `overline` - Put a horizontal line above the text. *(Not widely supported)*
+- `inverse`- Invert background and foreground colors.
+- `hidden` - Print the text but make it invisible.
+- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
+- `visible`- Print the text only when Chalk has a color level above zero. Can be useful for things that are purely cosmetic.
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `blackBright` (alias: `gray`, `grey`)
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+## 256 and Truecolor color support
+
+Chalk supports 256 colors and [Truecolor](https://github.com/termstandard/colors) (16 million colors) on supported terminal apps.
+
+Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
+
+Examples:
+
+- `chalk.hex('#DEADED').underline('Hello, world!')`
+- `chalk.rgb(15, 100, 204).inverse('Hello!')`
+
+Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `hex` for foreground colors and `bgHex` for background colors).
+
+- `chalk.bgHex('#DEADED').underline('Hello, world!')`
+- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
+
+The following color models can be used:
+
+- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
+- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
+- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
+
+## Browser support
+
+Since Chrome 69, ANSI escape codes are natively supported in the developer console.
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
+
+## Origin story
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
+
+## Related
+
+- [chalk-template](https://github.com/chalk/chalk-template) - [Tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) support for this module
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
+- [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
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
+- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
+- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
+- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
+- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
diff --git a/node_modules/log-symbols/node_modules/chalk/source/index.d.ts b/node_modules/log-symbols/node_modules/chalk/source/index.d.ts
new file mode 100644
index 0000000..b0cd2ae
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/index.d.ts
@@ -0,0 +1,320 @@
+// TODO: Make it this when TS suports that.
+// import {ModifierName, ForegroundColor, BackgroundColor, ColorName} from '#ansi-styles';
+// import {ColorInfo, ColorSupportLevel} from '#supports-color';
+import {ModifierName, ForegroundColorName, BackgroundColorName, ColorName} from './vendor/ansi-styles/index.js';
+import {ColorInfo, ColorSupportLevel} from './vendor/supports-color/index.js';
+
+export interface Options {
+ /**
+ Specify the color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ readonly level?: ColorSupportLevel;
+}
+
+/**
+Return a new Chalk instance.
+*/
+export const Chalk: new (options?: Options) => ChalkInstance; // eslint-disable-line @typescript-eslint/naming-convention
+
+export interface ChalkInstance {
+ (...text: unknown[]): string;
+
+ /**
+ The color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ level: ColorSupportLevel;
+
+ /**
+ Use RGB values to set text color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.rgb(222, 173, 237);
+ ```
+ */
+ rgb: (red: number, green: number, blue: number) => this;
+
+ /**
+ Use HEX value to set text color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.hex('#DEADED');
+ ```
+ */
+ hex: (color: string) => this;
+
+ /**
+ Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.ansi256(201);
+ ```
+ */
+ ansi256: (index: number) => this;
+
+ /**
+ Use RGB values to set background color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.bgRgb(222, 173, 237);
+ ```
+ */
+ bgRgb: (red: number, green: number, blue: number) => this;
+
+ /**
+ Use HEX value to set background color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.bgHex('#DEADED');
+ ```
+ */
+ bgHex: (color: string) => this;
+
+ /**
+ Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.bgAnsi256(201);
+ ```
+ */
+ bgAnsi256: (index: number) => this;
+
+ /**
+ Modifier: Reset the current style.
+ */
+ readonly reset: this;
+
+ /**
+ Modifier: Make the text bold.
+ */
+ readonly bold: this;
+
+ /**
+ Modifier: Make the text have lower opacity.
+ */
+ readonly dim: this;
+
+ /**
+ Modifier: Make the text italic. *(Not widely supported)*
+ */
+ readonly italic: this;
+
+ /**
+ Modifier: Put a horizontal line below the text. *(Not widely supported)*
+ */
+ readonly underline: this;
+
+ /**
+ Modifier: Put a horizontal line above the text. *(Not widely supported)*
+ */
+ readonly overline: this;
+
+ /**
+ Modifier: Invert background and foreground colors.
+ */
+ readonly inverse: this;
+
+ /**
+ Modifier: Print the text but make it invisible.
+ */
+ readonly hidden: this;
+
+ /**
+ Modifier: Puts a horizontal line through the center of the text. *(Not widely supported)*
+ */
+ readonly strikethrough: this;
+
+ /**
+ Modifier: Print the text only when Chalk has a color level above zero.
+
+ Can be useful for things that are purely cosmetic.
+ */
+ readonly visible: this;
+
+ readonly black: this;
+ readonly red: this;
+ readonly green: this;
+ readonly yellow: this;
+ readonly blue: this;
+ readonly magenta: this;
+ readonly cyan: this;
+ readonly white: this;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly gray: this;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly grey: this;
+
+ readonly blackBright: this;
+ readonly redBright: this;
+ readonly greenBright: this;
+ readonly yellowBright: this;
+ readonly blueBright: this;
+ readonly magentaBright: this;
+ readonly cyanBright: this;
+ readonly whiteBright: this;
+
+ readonly bgBlack: this;
+ readonly bgRed: this;
+ readonly bgGreen: this;
+ readonly bgYellow: this;
+ readonly bgBlue: this;
+ readonly bgMagenta: this;
+ readonly bgCyan: this;
+ readonly bgWhite: this;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: this;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: this;
+
+ readonly bgBlackBright: this;
+ readonly bgRedBright: this;
+ readonly bgGreenBright: this;
+ readonly bgYellowBright: this;
+ readonly bgBlueBright: this;
+ readonly bgMagentaBright: this;
+ readonly bgCyanBright: this;
+ readonly bgWhiteBright: this;
+}
+
+/**
+Main Chalk object that allows to chain styles together.
+
+Call the last one as a method with a string argument.
+
+Order doesn't matter, and later styles take precedent in case of a conflict.
+
+This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+*/
+declare const chalk: ChalkInstance;
+
+export const supportsColor: ColorInfo;
+
+export const chalkStderr: typeof chalk;
+export const supportsColorStderr: typeof supportsColor;
+
+export {
+ ModifierName, ForegroundColorName, BackgroundColorName, ColorName,
+ modifierNames, foregroundColorNames, backgroundColorNames, colorNames,
+// } from '#ansi-styles';
+} from './vendor/ansi-styles/index.js';
+
+export {
+ ColorInfo,
+ ColorSupport,
+ ColorSupportLevel,
+// } from '#supports-color';
+} from './vendor/supports-color/index.js';
+
+// TODO: Remove these aliases in the next major version
+/**
+@deprecated Use `ModifierName` instead.
+
+Basic modifier names.
+*/
+export type Modifiers = ModifierName;
+
+/**
+@deprecated Use `ForegroundColorName` instead.
+
+Basic foreground color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type ForegroundColor = ForegroundColorName;
+
+/**
+@deprecated Use `BackgroundColorName` instead.
+
+Basic background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type BackgroundColor = BackgroundColorName;
+
+/**
+@deprecated Use `ColorName` instead.
+
+Basic color names. The combination of foreground and background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type Color = ColorName;
+
+/**
+@deprecated Use `modifierNames` instead.
+
+Basic modifier names.
+*/
+export const modifiers: readonly Modifiers[];
+
+/**
+@deprecated Use `foregroundColorNames` instead.
+
+Basic foreground color names.
+*/
+export const foregroundColors: readonly ForegroundColor[];
+
+/**
+@deprecated Use `backgroundColorNames` instead.
+
+Basic background color names.
+*/
+export const backgroundColors: readonly BackgroundColor[];
+
+/**
+@deprecated Use `colorNames` instead.
+
+Basic color names. The combination of foreground and background color names.
+*/
+export const colors: readonly Color[];
+
+export default chalk;
diff --git a/node_modules/log-symbols/node_modules/chalk/source/index.js b/node_modules/log-symbols/node_modules/chalk/source/index.js
new file mode 100644
index 0000000..8bc993d
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/index.js
@@ -0,0 +1,225 @@
+import ansiStyles from '#ansi-styles';
+import supportsColor from '#supports-color';
+import { // eslint-disable-line import/order
+ stringReplaceAll,
+ stringEncaseCRLFWithFirstIndex,
+} from './utilities.js';
+
+const {stdout: stdoutColor, stderr: stderrColor} = supportsColor;
+
+const GENERATOR = Symbol('GENERATOR');
+const STYLER = Symbol('STYLER');
+const IS_EMPTY = Symbol('IS_EMPTY');
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = [
+ 'ansi',
+ 'ansi',
+ 'ansi256',
+ 'ansi16m',
+];
+
+const styles = Object.create(null);
+
+const applyOptions = (object, options = {}) => {
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
+ throw new Error('The `level` option should be an integer from 0 to 3');
+ }
+
+ // Detect level if not set manually
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
+ object.level = options.level === undefined ? colorLevel : options.level;
+};
+
+export class Chalk {
+ constructor(options) {
+ // eslint-disable-next-line no-constructor-return
+ return chalkFactory(options);
+ }
+}
+
+const chalkFactory = options => {
+ const chalk = (...strings) => strings.join(' ');
+ applyOptions(chalk, options);
+
+ Object.setPrototypeOf(chalk, createChalk.prototype);
+
+ return chalk;
+};
+
+function createChalk(options) {
+ return chalkFactory(options);
+}
+
+Object.setPrototypeOf(createChalk.prototype, Function.prototype);
+
+for (const [styleName, style] of Object.entries(ansiStyles)) {
+ styles[styleName] = {
+ get() {
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
+ Object.defineProperty(this, styleName, {value: builder});
+ return builder;
+ },
+ };
+}
+
+styles.visible = {
+ get() {
+ const builder = createBuilder(this, this[STYLER], true);
+ Object.defineProperty(this, 'visible', {value: builder});
+ return builder;
+ },
+};
+
+const getModelAnsi = (model, level, type, ...arguments_) => {
+ if (model === 'rgb') {
+ if (level === 'ansi16m') {
+ return ansiStyles[type].ansi16m(...arguments_);
+ }
+
+ if (level === 'ansi256') {
+ return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
+ }
+
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
+ }
+
+ if (model === 'hex') {
+ return getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));
+ }
+
+ return ansiStyles[type][model](...arguments_);
+};
+
+const usedModels = ['rgb', 'hex', 'ansi256'];
+
+for (const model of usedModels) {
+ styles[model] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);
+ return createBuilder(this, styler, this[IS_EMPTY]);
+ };
+ },
+ };
+
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
+ return createBuilder(this, styler, this[IS_EMPTY]);
+ };
+ },
+ };
+}
+
+const proto = Object.defineProperties(() => {}, {
+ ...styles,
+ level: {
+ enumerable: true,
+ get() {
+ return this[GENERATOR].level;
+ },
+ set(level) {
+ this[GENERATOR].level = level;
+ },
+ },
+});
+
+const createStyler = (open, close, parent) => {
+ let openAll;
+ let closeAll;
+ if (parent === undefined) {
+ openAll = open;
+ closeAll = close;
+ } else {
+ openAll = parent.openAll + open;
+ closeAll = close + parent.closeAll;
+ }
+
+ return {
+ open,
+ close,
+ openAll,
+ closeAll,
+ parent,
+ };
+};
+
+const createBuilder = (self, _styler, _isEmpty) => {
+ // Single argument is hot path, implicit coercion is faster than anything
+ // eslint-disable-next-line no-implicit-coercion
+ const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
+
+ // We alter the prototype because we must return a function, but there is
+ // no way to create a function with a different prototype
+ Object.setPrototypeOf(builder, proto);
+
+ builder[GENERATOR] = self;
+ builder[STYLER] = _styler;
+ builder[IS_EMPTY] = _isEmpty;
+
+ return builder;
+};
+
+const applyStyle = (self, string) => {
+ if (self.level <= 0 || !string) {
+ return self[IS_EMPTY] ? '' : string;
+ }
+
+ let styler = self[STYLER];
+
+ if (styler === undefined) {
+ return string;
+ }
+
+ const {openAll, closeAll} = styler;
+ if (string.includes('\u001B')) {
+ while (styler !== undefined) {
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ string = stringReplaceAll(string, styler.close, styler.open);
+
+ styler = styler.parent;
+ }
+ }
+
+ // We can move both next actions out of loop, because remaining actions in loop won't have
+ // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
+ const lfIndex = string.indexOf('\n');
+ if (lfIndex !== -1) {
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
+ }
+
+ return openAll + string + closeAll;
+};
+
+Object.defineProperties(createChalk.prototype, styles);
+
+const chalk = createChalk();
+export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
+
+export {
+ modifierNames,
+ foregroundColorNames,
+ backgroundColorNames,
+ colorNames,
+
+ // TODO: Remove these aliases in the next major version
+ modifierNames as modifiers,
+ foregroundColorNames as foregroundColors,
+ backgroundColorNames as backgroundColors,
+ colorNames as colors,
+} from './vendor/ansi-styles/index.js';
+
+export {
+ stdoutColor as supportsColor,
+ stderrColor as supportsColorStderr,
+};
+
+export default chalk;
diff --git a/node_modules/log-symbols/node_modules/chalk/source/utilities.js b/node_modules/log-symbols/node_modules/chalk/source/utilities.js
new file mode 100644
index 0000000..4366dee
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/utilities.js
@@ -0,0 +1,33 @@
+// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
+export function stringReplaceAll(string, substring, replacer) {
+ let index = string.indexOf(substring);
+ if (index === -1) {
+ return string;
+ }
+
+ const substringLength = substring.length;
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ returnValue += string.slice(endIndex, index) + substring + replacer;
+ endIndex = index + substringLength;
+ index = string.indexOf(substring, endIndex);
+ } while (index !== -1);
+
+ returnValue += string.slice(endIndex);
+ return returnValue;
+}
+
+export function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ const gotCR = string[index - 1] === '\r';
+ returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
+ endIndex = index + 1;
+ index = string.indexOf('\n', endIndex);
+ } while (index !== -1);
+
+ returnValue += string.slice(endIndex);
+ return returnValue;
+}
diff --git a/node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.d.ts b/node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.d.ts
new file mode 100644
index 0000000..58f133a
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.d.ts
@@ -0,0 +1,236 @@
+export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention
+ /**
+ The ANSI terminal control sequence for starting this style.
+ */
+ readonly open: string;
+
+ /**
+ The ANSI terminal control sequence for ending this style.
+ */
+ readonly close: string;
+}
+
+export interface ColorBase {
+ /**
+ The ANSI terminal control sequence for ending this color.
+ */
+ readonly close: string;
+
+ ansi(code: number): string;
+
+ ansi256(code: number): string;
+
+ ansi16m(red: number, green: number, blue: number): string;
+}
+
+export interface Modifier {
+ /**
+ Resets the current color chain.
+ */
+ readonly reset: CSPair;
+
+ /**
+ Make text bold.
+ */
+ readonly bold: CSPair;
+
+ /**
+ Emitting only a small amount of light.
+ */
+ readonly dim: CSPair;
+
+ /**
+ Make text italic. (Not widely supported)
+ */
+ readonly italic: CSPair;
+
+ /**
+ Make text underline. (Not widely supported)
+ */
+ readonly underline: CSPair;
+
+ /**
+ Make text overline.
+
+ Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
+ */
+ readonly overline: CSPair;
+
+ /**
+ Inverse background and foreground colors.
+ */
+ readonly inverse: CSPair;
+
+ /**
+ Prints the text, but makes it invisible.
+ */
+ readonly hidden: CSPair;
+
+ /**
+ Puts a horizontal line through the center of the text. (Not widely supported)
+ */
+ readonly strikethrough: CSPair;
+}
+
+export interface ForegroundColor {
+ readonly black: CSPair;
+ readonly red: CSPair;
+ readonly green: CSPair;
+ readonly yellow: CSPair;
+ readonly blue: CSPair;
+ readonly cyan: CSPair;
+ readonly magenta: CSPair;
+ readonly white: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly gray: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly grey: CSPair;
+
+ readonly blackBright: CSPair;
+ readonly redBright: CSPair;
+ readonly greenBright: CSPair;
+ readonly yellowBright: CSPair;
+ readonly blueBright: CSPair;
+ readonly cyanBright: CSPair;
+ readonly magentaBright: CSPair;
+ readonly whiteBright: CSPair;
+}
+
+export interface BackgroundColor {
+ readonly bgBlack: CSPair;
+ readonly bgRed: CSPair;
+ readonly bgGreen: CSPair;
+ readonly bgYellow: CSPair;
+ readonly bgBlue: CSPair;
+ readonly bgCyan: CSPair;
+ readonly bgMagenta: CSPair;
+ readonly bgWhite: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: CSPair;
+
+ readonly bgBlackBright: CSPair;
+ readonly bgRedBright: CSPair;
+ readonly bgGreenBright: CSPair;
+ readonly bgYellowBright: CSPair;
+ readonly bgBlueBright: CSPair;
+ readonly bgCyanBright: CSPair;
+ readonly bgMagentaBright: CSPair;
+ readonly bgWhiteBright: CSPair;
+}
+
+export interface ConvertColor {
+ /**
+ Convert from the RGB color space to the ANSI 256 color space.
+
+ @param red - (`0...255`)
+ @param green - (`0...255`)
+ @param blue - (`0...255`)
+ */
+ rgbToAnsi256(red: number, green: number, blue: number): number;
+
+ /**
+ Convert from the RGB HEX color space to the RGB color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hexToRgb(hex: string): [red: number, green: number, blue: number];
+
+ /**
+ Convert from the RGB HEX color space to the ANSI 256 color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hexToAnsi256(hex: string): number;
+
+ /**
+ Convert from the ANSI 256 color space to the ANSI 16 color space.
+
+ @param code - A number representing the ANSI 256 color.
+ */
+ ansi256ToAnsi(code: number): number;
+
+ /**
+ Convert from the RGB color space to the ANSI 16 color space.
+
+ @param red - (`0...255`)
+ @param green - (`0...255`)
+ @param blue - (`0...255`)
+ */
+ rgbToAnsi(red: number, green: number, blue: number): number;
+
+ /**
+ Convert from the RGB HEX color space to the ANSI 16 color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hexToAnsi(hex: string): number;
+}
+
+/**
+Basic modifier names.
+*/
+export type ModifierName = keyof Modifier;
+
+/**
+Basic foreground color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type ForegroundColorName = keyof ForegroundColor;
+
+/**
+Basic background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type BackgroundColorName = keyof BackgroundColor;
+
+/**
+Basic color names. The combination of foreground and background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type ColorName = ForegroundColorName | BackgroundColorName;
+
+/**
+Basic modifier names.
+*/
+export const modifierNames: readonly ModifierName[];
+
+/**
+Basic foreground color names.
+*/
+export const foregroundColorNames: readonly ForegroundColorName[];
+
+/**
+Basic background color names.
+*/
+export const backgroundColorNames: readonly BackgroundColorName[];
+
+/*
+Basic color names. The combination of foreground and background color names.
+*/
+export const colorNames: readonly ColorName[];
+
+declare const ansiStyles: {
+ readonly modifier: Modifier;
+ readonly color: ColorBase & ForegroundColor;
+ readonly bgColor: ColorBase & BackgroundColor;
+ readonly codes: ReadonlyMap<number, number>;
+} & ForegroundColor & BackgroundColor & Modifier & ConvertColor;
+
+export default ansiStyles;
diff --git a/node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.js b/node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.js
new file mode 100644
index 0000000..eaa7bed
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.js
@@ -0,0 +1,223 @@
+const ANSI_BACKGROUND_OFFSET = 10;
+
+const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
+
+const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
+
+const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
+
+const styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ overline: [53, 55],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29],
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+
+ // Bright color
+ blackBright: [90, 39],
+ gray: [90, 39], // Alias of `blackBright`
+ grey: [90, 39], // Alias of `blackBright`
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39],
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgGray: [100, 49], // Alias of `bgBlackBright`
+ bgGrey: [100, 49], // Alias of `bgBlackBright`
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49],
+ },
+};
+
+export const modifierNames = Object.keys(styles.modifier);
+export const foregroundColorNames = Object.keys(styles.color);
+export const backgroundColorNames = Object.keys(styles.bgColor);
+export const colorNames = [...foregroundColorNames, ...backgroundColorNames];
+
+function assembleStyles() {
+ const codes = new Map();
+
+ for (const [groupName, group] of Object.entries(styles)) {
+ for (const [styleName, style] of Object.entries(group)) {
+ styles[styleName] = {
+ open: `\u001B[${style[0]}m`,
+ close: `\u001B[${style[1]}m`,
+ };
+
+ group[styleName] = styles[styleName];
+
+ codes.set(style[0], style[1]);
+ }
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false,
+ });
+ }
+
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false,
+ });
+
+ styles.color.close = '\u001B[39m';
+ styles.bgColor.close = '\u001B[49m';
+
+ styles.color.ansi = wrapAnsi16();
+ styles.color.ansi256 = wrapAnsi256();
+ styles.color.ansi16m = wrapAnsi16m();
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
+
+ // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
+ Object.defineProperties(styles, {
+ rgbToAnsi256: {
+ value(red, green, blue) {
+ // We use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (red === green && green === blue) {
+ if (red < 8) {
+ return 16;
+ }
+
+ if (red > 248) {
+ return 231;
+ }
+
+ return Math.round(((red - 8) / 247) * 24) + 232;
+ }
+
+ return 16
+ + (36 * Math.round(red / 255 * 5))
+ + (6 * Math.round(green / 255 * 5))
+ + Math.round(blue / 255 * 5);
+ },
+ enumerable: false,
+ },
+ hexToRgb: {
+ value(hex) {
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
+ if (!matches) {
+ return [0, 0, 0];
+ }
+
+ let [colorString] = matches;
+
+ if (colorString.length === 3) {
+ colorString = [...colorString].map(character => character + character).join('');
+ }
+
+ const integer = Number.parseInt(colorString, 16);
+
+ return [
+ /* eslint-disable no-bitwise */
+ (integer >> 16) & 0xFF,
+ (integer >> 8) & 0xFF,
+ integer & 0xFF,
+ /* eslint-enable no-bitwise */
+ ];
+ },
+ enumerable: false,
+ },
+ hexToAnsi256: {
+ value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
+ enumerable: false,
+ },
+ ansi256ToAnsi: {
+ value(code) {
+ if (code < 8) {
+ return 30 + code;
+ }
+
+ if (code < 16) {
+ return 90 + (code - 8);
+ }
+
+ let red;
+ let green;
+ let blue;
+
+ if (code >= 232) {
+ red = (((code - 232) * 10) + 8) / 255;
+ green = red;
+ blue = red;
+ } else {
+ code -= 16;
+
+ const remainder = code % 36;
+
+ red = Math.floor(code / 36) / 5;
+ green = Math.floor(remainder / 6) / 5;
+ blue = (remainder % 6) / 5;
+ }
+
+ const value = Math.max(red, green, blue) * 2;
+
+ if (value === 0) {
+ return 30;
+ }
+
+ // eslint-disable-next-line no-bitwise
+ let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
+
+ if (value === 2) {
+ result += 60;
+ }
+
+ return result;
+ },
+ enumerable: false,
+ },
+ rgbToAnsi: {
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
+ enumerable: false,
+ },
+ hexToAnsi: {
+ value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
+ enumerable: false,
+ },
+ });
+
+ return styles;
+}
+
+const ansiStyles = assembleStyles();
+
+export default ansiStyles;
diff --git a/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.d.ts b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.d.ts
new file mode 100644
index 0000000..0e8a9cc
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.d.ts
@@ -0,0 +1 @@
+export {default} from './index.js';
diff --git a/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.js b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.js
new file mode 100644
index 0000000..9fa6888
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/browser.js
@@ -0,0 +1,30 @@
+/* eslint-env browser */
+
+const level = (() => {
+ if (navigator.userAgentData) {
+ const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
+ if (brand && brand.version > 93) {
+ return 3;
+ }
+ }
+
+ if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) {
+ return 1;
+ }
+
+ return 0;
+})();
+
+const colorSupport = level !== 0 && {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3,
+};
+
+const supportsColor = {
+ stdout: colorSupport,
+ stderr: colorSupport,
+};
+
+export default supportsColor;
diff --git a/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.d.ts b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.d.ts
new file mode 100644
index 0000000..db44a78
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.d.ts
@@ -0,0 +1,55 @@
+import type {WriteStream} from 'node:tty';
+
+export type Options = {
+ /**
+ Whether `process.argv` should be sniffed for `--color` and `--no-color` flags.
+
+ @default true
+ */
+ readonly sniffFlags?: boolean;
+};
+
+/**
+Levels:
+- `0` - All colors disabled.
+- `1` - Basic 16 colors support.
+- `2` - ANSI 256 colors support.
+- `3` - Truecolor 16 million colors support.
+*/
+export type ColorSupportLevel = 0 | 1 | 2 | 3;
+
+/**
+Detect whether the terminal supports color.
+*/
+export type ColorSupport = {
+ /**
+ The color level.
+ */
+ level: ColorSupportLevel;
+
+ /**
+ Whether basic 16 colors are supported.
+ */
+ hasBasic: boolean;
+
+ /**
+ Whether ANSI 256 colors are supported.
+ */
+ has256: boolean;
+
+ /**
+ Whether Truecolor 16 million colors are supported.
+ */
+ has16m: boolean;
+};
+
+export type ColorInfo = ColorSupport | false;
+
+export function createSupportsColor(stream?: WriteStream, options?: Options): ColorInfo;
+
+declare const supportsColor: {
+ stdout: ColorInfo;
+ stderr: ColorInfo;
+};
+
+export default supportsColor;
diff --git a/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.js b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.js
new file mode 100644
index 0000000..a7cea61
--- /dev/null
+++ b/node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.js
@@ -0,0 +1,181 @@
+import process from 'node:process';
+import os from 'node:os';
+import tty from 'node:tty';
+
+// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
+function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const position = argv.indexOf(prefix + flag);
+ const terminatorPosition = argv.indexOf('--');
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
+}
+
+const {env} = process;
+
+let flagForceColor;
+if (
+ hasFlag('no-color')
+ || hasFlag('no-colors')
+ || hasFlag('color=false')
+ || hasFlag('color=never')
+) {
+ flagForceColor = 0;
+} else if (
+ hasFlag('color')
+ || hasFlag('colors')
+ || hasFlag('color=true')
+ || hasFlag('color=always')
+) {
+ flagForceColor = 1;
+}
+
+function envForceColor() {
+ if ('FORCE_COLOR' in env) {
+ if (env.FORCE_COLOR === 'true') {
+ return 1;
+ }
+
+ if (env.FORCE_COLOR === 'false') {
+ return 0;
+ }
+
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
+ }
+}
+
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3,
+ };
+}
+
+function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
+ const noFlagForceColor = envForceColor();
+ if (noFlagForceColor !== undefined) {
+ flagForceColor = noFlagForceColor;
+ }
+
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
+
+ if (forceColor === 0) {
+ return 0;
+ }
+
+ if (sniffFlags) {
+ if (hasFlag('color=16m')
+ || hasFlag('color=full')
+ || hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+ }
+
+ // Check for Azure DevOps pipelines.
+ // Has to be above the `!streamIsTTY` check.
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
+ return 1;
+ }
+
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
+ return 0;
+ }
+
+ const min = forceColor || 0;
+
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ if (process.platform === 'win32') {
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
+ const osRelease = os.release().split('.');
+ if (
+ Number(osRelease[0]) >= 10
+ && Number(osRelease[2]) >= 10_586
+ ) {
+ return Number(osRelease[2]) >= 14_931 ? 3 : 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if ('GITHUB_ACTIONS' in env) {
+ return 3;
+ }
+
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return min;
+ }
+
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
+
+ if (env.TERM === 'xterm-kitty') {
+ return 3;
+ }
+
+ if ('TERM_PROGRAM' in env) {
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app': {
+ return version >= 3 ? 3 : 2;
+ }
+
+ case 'Apple_Terminal': {
+ return 2;
+ }
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ return min;
+}
+
+export function createSupportsColor(stream, options = {}) {
+ const level = _supportsColor(stream, {
+ streamIsTTY: stream && stream.isTTY,
+ ...options,
+ });
+
+ return translateLevel(level);
+}
+
+const supportsColor = {
+ stdout: createSupportsColor({isTTY: tty.isatty(1)}),
+ stderr: createSupportsColor({isTTY: tty.isatty(2)}),
+};
+
+export default supportsColor;
diff --git a/node_modules/log-symbols/package.json b/node_modules/log-symbols/package.json
new file mode 100644
index 0000000..3ea6e13
--- /dev/null
+++ b/node_modules/log-symbols/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "log-symbols",
+ "version": "5.1.0",
+ "description": "Colored symbols for various log levels. Example: `✔︎ Success`",
+ "license": "MIT",
+ "repository": "sindresorhus/log-symbols",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": {
+ "node": "./index.js",
+ "default": "./browser.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "browser.js"
+ ],
+ "keywords": [
+ "unicode",
+ "cli",
+ "cmd",
+ "command-line",
+ "characters",
+ "symbol",
+ "symbols",
+ "figure",
+ "figures",
+ "fallback",
+ "windows",
+ "log",
+ "logging",
+ "terminal",
+ "stdout"
+ ],
+ "dependencies": {
+ "chalk": "^5.0.0",
+ "is-unicode-supported": "^1.1.0"
+ },
+ "devDependencies": {
+ "ava": "^3.15.0",
+ "strip-ansi": "^7.0.1",
+ "tsd": "^0.19.0",
+ "xo": "^0.47.0"
+ }
+}
diff --git a/node_modules/log-symbols/readme.md b/node_modules/log-symbols/readme.md
new file mode 100644
index 0000000..11dfccf
--- /dev/null
+++ b/node_modules/log-symbols/readme.md
@@ -0,0 +1,51 @@
+# log-symbols
+
+<img src="screenshot.png" width="226" height="192" align="right">
+
+> Colored symbols for various log levels
+
+Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
+
+## Install
+
+```sh
+npm install log-symbols
+```
+
+## Usage
+
+```js
+import logSymbols from 'log-symbols';
+
+console.log(logSymbols.success, 'Finished successfully!');
+// Terminals with Unicode support: ✔ Finished successfully!
+// Terminals without Unicode support: √ Finished successfully!
+```
+
+## API
+
+### logSymbols
+
+#### info
+#### success
+#### warning
+#### error
+
+## Related
+
+- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows CMD fallbacks
+- [py-log-symbols](https://github.com/ManrajGrover/py-log-symbols) - Python port
+- [log-symbols](https://github.com/palash25/log-symbols) - Ruby port
+- [guumaster/logsymbols](https://github.com/guumaster/logsymbols) - Golang port
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-log-symbols?utm_source=npm-log-symbols&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/mimic-fn/index.d.ts b/node_modules/mimic-fn/index.d.ts
new file mode 100644
index 0000000..b4047d5
--- /dev/null
+++ b/node_modules/mimic-fn/index.d.ts
@@ -0,0 +1,54 @@
+declare const mimicFn: {
+ /**
+ Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
+
+ @param to - Mimicking function.
+ @param from - Function to mimic.
+ @returns The modified `to` function.
+
+ @example
+ ```
+ import mimicFn = require('mimic-fn');
+
+ function foo() {}
+ foo.unicorn = '🦄';
+
+ function wrapper() {
+ return foo();
+ }
+
+ console.log(wrapper.name);
+ //=> 'wrapper'
+
+ mimicFn(wrapper, foo);
+
+ console.log(wrapper.name);
+ //=> 'foo'
+
+ console.log(wrapper.unicorn);
+ //=> '🦄'
+ ```
+ */
+ <
+ ArgumentsType extends unknown[],
+ ReturnType,
+ FunctionType extends (...arguments: ArgumentsType) => ReturnType
+ >(
+ to: (...arguments: ArgumentsType) => ReturnType,
+ from: FunctionType
+ ): FunctionType;
+
+ // TODO: Remove this for the next major release, refactor the whole definition to:
+ // declare function mimicFn<
+ // ArgumentsType extends unknown[],
+ // ReturnType,
+ // FunctionType extends (...arguments: ArgumentsType) => ReturnType
+ // >(
+ // to: (...arguments: ArgumentsType) => ReturnType,
+ // from: FunctionType
+ // ): FunctionType;
+ // export = mimicFn;
+ default: typeof mimicFn;
+};
+
+export = mimicFn;
diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js
new file mode 100644
index 0000000..1a59705
--- /dev/null
+++ b/node_modules/mimic-fn/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+const mimicFn = (to, from) => {
+ for (const prop of Reflect.ownKeys(from)) {
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
+ }
+
+ return to;
+};
+
+module.exports = mimicFn;
+// TODO: Remove this for the next major release
+module.exports.default = mimicFn;
diff --git a/node_modules/mimic-fn/license b/node_modules/mimic-fn/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/mimic-fn/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-fn/package.json b/node_modules/mimic-fn/package.json
new file mode 100644
index 0000000..199d2c7
--- /dev/null
+++ b/node_modules/mimic-fn/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "mimic-fn",
+ "version": "2.1.0",
+ "description": "Make a function mimic another one",
+ "license": "MIT",
+ "repository": "sindresorhus/mimic-fn",
+ "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": [
+ "function",
+ "mimic",
+ "imitate",
+ "rename",
+ "copy",
+ "inherit",
+ "properties",
+ "name",
+ "func",
+ "fn",
+ "set",
+ "infer",
+ "change"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/mimic-fn/readme.md b/node_modules/mimic-fn/readme.md
new file mode 100644
index 0000000..0ef8a13
--- /dev/null
+++ b/node_modules/mimic-fn/readme.md
@@ -0,0 +1,69 @@
+# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn)
+
+> Make a function mimic another one
+
+Useful when you wrap a function in another function and like to preserve the original name and other properties.
+
+
+## Install
+
+```
+$ npm install mimic-fn
+```
+
+
+## Usage
+
+```js
+const mimicFn = require('mimic-fn');
+
+function foo() {}
+foo.unicorn = '🦄';
+
+function wrapper() {
+ return foo();
+}
+
+console.log(wrapper.name);
+//=> 'wrapper'
+
+mimicFn(wrapper, foo);
+
+console.log(wrapper.name);
+//=> 'foo'
+
+console.log(wrapper.unicorn);
+//=> '🦄'
+```
+
+
+## API
+
+It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
+
+### mimicFn(to, from)
+
+Modifies the `to` function and returns it.
+
+#### to
+
+Type: `Function`
+
+Mimicking function.
+
+#### from
+
+Type: `Function`
+
+Function to mimic.
+
+
+## Related
+
+- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
+- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/onetime/index.d.ts b/node_modules/onetime/index.d.ts
new file mode 100644
index 0000000..ea84cab
--- /dev/null
+++ b/node_modules/onetime/index.d.ts
@@ -0,0 +1,64 @@
+declare namespace onetime {
+ interface Options {
+ /**
+ Throw an error when called more than once.
+
+ @default false
+ */
+ throw?: boolean;
+ }
+}
+
+declare const onetime: {
+ /**
+ Ensure a function is only called once. When called multiple times it will return the return value from the first call.
+
+ @param fn - Function that should only be called once.
+ @returns A function that only calls `fn` once.
+
+ @example
+ ```
+ import onetime = require('onetime');
+
+ let i = 0;
+
+ const foo = onetime(() => ++i);
+
+ foo(); //=> 1
+ foo(); //=> 1
+ foo(); //=> 1
+
+ onetime.callCount(foo); //=> 3
+ ```
+ */
+ <ArgumentsType extends unknown[], ReturnType>(
+ fn: (...arguments: ArgumentsType) => ReturnType,
+ options?: onetime.Options
+ ): (...arguments: ArgumentsType) => ReturnType;
+
+ /**
+ Get the number of times `fn` has been called.
+
+ @param fn - Function to get call count from.
+ @returns A number representing how many times `fn` has been called.
+
+ @example
+ ```
+ import onetime = require('onetime');
+
+ const foo = onetime(() => {});
+ foo();
+ foo();
+ foo();
+
+ console.log(onetime.callCount(foo));
+ //=> 3
+ ```
+ */
+ callCount(fn: (...arguments: any[]) => unknown): number;
+
+ // TODO: Remove this for the next major release
+ default: typeof onetime;
+};
+
+export = onetime;
diff --git a/node_modules/onetime/index.js b/node_modules/onetime/index.js
new file mode 100644
index 0000000..99c5fc1
--- /dev/null
+++ b/node_modules/onetime/index.js
@@ -0,0 +1,44 @@
+'use strict';
+const mimicFn = require('mimic-fn');
+
+const calledFunctions = new WeakMap();
+
+const onetime = (function_, options = {}) => {
+ if (typeof function_ !== 'function') {
+ throw new TypeError('Expected a function');
+ }
+
+ let returnValue;
+ let callCount = 0;
+ const functionName = function_.displayName || function_.name || '<anonymous>';
+
+ const onetime = function (...arguments_) {
+ calledFunctions.set(onetime, ++callCount);
+
+ if (callCount === 1) {
+ returnValue = function_.apply(this, arguments_);
+ function_ = null;
+ } else if (options.throw === true) {
+ throw new Error(`Function \`${functionName}\` can only be called once`);
+ }
+
+ return returnValue;
+ };
+
+ mimicFn(onetime, function_);
+ calledFunctions.set(onetime, callCount);
+
+ return onetime;
+};
+
+module.exports = onetime;
+// TODO: Remove this for the next major release
+module.exports.default = onetime;
+
+module.exports.callCount = function_ => {
+ if (!calledFunctions.has(function_)) {
+ throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
+ }
+
+ return calledFunctions.get(function_);
+};
diff --git a/node_modules/onetime/license b/node_modules/onetime/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/onetime/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/onetime/package.json b/node_modules/onetime/package.json
new file mode 100644
index 0000000..54caea5
--- /dev/null
+++ b/node_modules/onetime/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "onetime",
+ "version": "5.1.2",
+ "description": "Ensure a function is only called once",
+ "license": "MIT",
+ "repository": "sindresorhus/onetime",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "onetime",
+ "func",
+ "fn",
+ "single",
+ "call",
+ "called",
+ "prevent"
+ ],
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/onetime/readme.md b/node_modules/onetime/readme.md
new file mode 100644
index 0000000..2d133d3
--- /dev/null
+++ b/node_modules/onetime/readme.md
@@ -0,0 +1,94 @@
+# onetime [![Build Status](https://travis-ci.com/sindresorhus/onetime.svg?branch=master)](https://travis-ci.com/github/sindresorhus/onetime)
+
+> Ensure a function is only called once
+
+When called multiple times it will return the return value from the first call.
+
+*Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty and extending `Function.prototype`.*
+
+## Install
+
+```
+$ npm install onetime
+```
+
+## Usage
+
+```js
+const onetime = require('onetime');
+
+let i = 0;
+
+const foo = onetime(() => ++i);
+
+foo(); //=> 1
+foo(); //=> 1
+foo(); //=> 1
+
+onetime.callCount(foo); //=> 3
+```
+
+```js
+const onetime = require('onetime');
+
+const foo = onetime(() => {}, {throw: true});
+
+foo();
+
+foo();
+//=> Error: Function `foo` can only be called once
+```
+
+## API
+
+### onetime(fn, options?)
+
+Returns a function that only calls `fn` once.
+
+#### fn
+
+Type: `Function`
+
+Function that should only be called once.
+
+#### options
+
+Type: `object`
+
+##### throw
+
+Type: `boolean`\
+Default: `false`
+
+Throw an error when called more than once.
+
+### onetime.callCount(fn)
+
+Returns a number representing how many times `fn` has been called.
+
+Note: It throws an error if you pass in a function that is not wrapped by `onetime`.
+
+```js
+const onetime = require('onetime');
+
+const foo = onetime(() => {});
+
+foo();
+foo();
+foo();
+
+console.log(onetime.callCount(foo));
+//=> 3
+```
+
+#### fn
+
+Type: `Function`
+
+Function to get call count from.
+
+## onetime for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of onetime 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-onetime?utm_source=npm-onetime&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/node_modules/ora/index.d.ts b/node_modules/ora/index.d.ts
new file mode 100644
index 0000000..ff84da3
--- /dev/null
+++ b/node_modules/ora/index.d.ts
@@ -0,0 +1,308 @@
+import {SpinnerName} from 'cli-spinners';
+
+export interface Spinner {
+ readonly interval?: number;
+ readonly frames: string[];
+}
+
+export type Color =
+ | 'black'
+ | 'red'
+ | 'green'
+ | 'yellow'
+ | 'blue'
+ | 'magenta'
+ | 'cyan'
+ | 'white'
+ | 'gray';
+
+export type PrefixTextGenerator = () => string;
+
+export interface Options {
+ /**
+ Text to display after the spinner.
+ */
+ readonly text?: string;
+
+ /**
+ Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
+ */
+ readonly prefixText?: string | PrefixTextGenerator;
+
+ /**
+ Name of one of the provided spinners. See [`example.js`](https://github.com/BendingBender/ora/blob/main/example.js) in this repo if you want to test out different spinners. On Windows, it will always use the line spinner as the Windows command-line doesn't have proper Unicode support.
+
+ @default 'dots'
+
+ Or an object like:
+
+ @example
+ ```
+ {
+ interval: 80, // Optional
+ frames: ['-', '+', '-']
+ }
+ ```
+ */
+ readonly spinner?: SpinnerName | Spinner;
+
+ /**
+ The color of the spinner.
+
+ @default 'cyan'
+ */
+ readonly color?: Color;
+
+ /**
+ Set to `false` to stop Ora from hiding the cursor.
+
+ @default true
+ */
+ readonly hideCursor?: boolean;
+
+ /**
+ Indent the spinner with the given number of spaces.
+
+ @default 0
+ */
+ readonly indent?: number;
+
+ /**
+ Interval between each frame.
+
+ Spinners provide their own recommended interval, so you don't really need to specify this.
+
+ Default: Provided by the spinner or `100`.
+ */
+ readonly interval?: number;
+
+ /**
+ Stream to write the output.
+
+ You could for example set this to `process.stdout` instead.
+
+ @default process.stderr
+ */
+ readonly stream?: NodeJS.WritableStream;
+
+ /**
+ Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
+
+ Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
+ */
+ readonly isEnabled?: boolean;
+
+ /**
+ Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
+
+ @default false
+ */
+ readonly isSilent?: boolean;
+
+ /**
+ Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on `Enter` key presses, and prevents buffering of input while the spinner is running.
+
+ This has no effect on Windows as there's no good way to implement discarding stdin properly there.
+
+ @default true
+ */
+ readonly discardStdin?: boolean;
+}
+
+export interface PersistOptions {
+ /**
+ Symbol to replace the spinner with.
+
+ @default ' '
+ */
+ readonly symbol?: string;
+
+ /**
+ Text to be persisted after the symbol.
+
+ Default: Current `text`.
+ */
+ readonly text?: string;
+
+ /**
+ Text or a function that returns text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
+
+ Default: Current `prefixText`.
+ */
+ readonly prefixText?: string | PrefixTextGenerator;
+}
+
+export interface PromiseOptions<T> extends Options {
+ /**
+ The new text of the spinner when the promise is resolved.
+
+ Keeps the existing text if `undefined`.
+ */
+ successText?: string | ((result: T) => string) | undefined;
+
+ /**
+ The new text of the spinner when the promise is rejected.
+
+ Keeps the existing text if `undefined`.
+ */
+ failText?: string | ((error: Error) => string) | undefined;
+}
+
+export interface Ora {
+ /**
+ Change the text after the spinner.
+ */
+ text: string;
+
+ /**
+ Change the text or function that returns text before the spinner.
+
+ No prefix text will be displayed if set to an empty string.
+ */
+ prefixText: string;
+
+ /**
+ Change the spinner color.
+ */
+ color: Color;
+
+ /**
+ Change the spinner indent.
+ */
+ indent: number;
+
+ /**
+ Get the spinner.
+ */
+ get spinner(): Spinner;
+
+ /**
+ Set the spinner.
+ */
+ set spinner(spinner: SpinnerName | Spinner);
+
+ /**
+ A boolean of whether the instance is currently spinning.
+ */
+ get isSpinning(): boolean;
+
+ /**
+ The interval between each frame.
+
+ The interval is decided by the chosen spinner.
+ */
+ get interval(): number;
+
+ /**
+ Start the spinner.
+
+ @param text - Set the current text.
+ @returns The spinner instance.
+ */
+ start(text?: string): this;
+
+ /**
+ Stop and clear the spinner.
+
+ @returns The spinner instance.
+ */
+ stop(): this;
+
+ /**
+ Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ succeed(text?: string): this;
+
+ /**
+ Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ fail(text?: string): this;
+
+ /**
+ Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ warn(text?: string): this;
+
+ /**
+ Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ info(text?: string): this;
+
+ /**
+ Stop the spinner and change the symbol or text.
+
+ @returns The spinner instance.
+ */
+ stopAndPersist(options?: PersistOptions): this;
+
+ /**
+ Clear the spinner.
+
+ @returns The spinner instance.
+ */
+ clear(): this;
+
+ /**
+ Manually render a new frame.
+
+ @returns The spinner instance.
+ */
+ render(): this;
+
+ /**
+ Get a new frame.
+
+ @returns The spinner instance text.
+ */
+ frame(): string;
+}
+
+/**
+Elegant terminal spinner.
+
+@param options - If a string is provided, it is treated as a shortcut for `options.text`.
+
+@example
+```
+import ora from 'ora';
+
+const spinner = ora('Loading unicorns').start();
+
+setTimeout(() => {
+ spinner.color = 'yellow';
+ spinner.text = 'Loading rainbows';
+}, 1000);
+```
+*/
+export default function ora(options?: string | Options): Ora;
+
+/**
+Starts a spinner for a promise or promise-returning function. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects.
+
+@param action - The promise to start the spinner for or a promise-returning function.
+@param options - If a string is provided, it is treated as a shortcut for `options.text`.
+@returns The given promise.
+
+@example
+```
+import {oraPromise} from 'ora';
+
+await oraPromise(somePromise);
+```
+*/
+export function oraPromise<T>(
+ action: PromiseLike<T> | ((spinner: Ora) => PromiseLike<T>),
+ options?: string | PromiseOptions<T>
+): Promise<T>;
diff --git a/node_modules/ora/index.js b/node_modules/ora/index.js
new file mode 100644
index 0000000..e098c14
--- /dev/null
+++ b/node_modules/ora/index.js
@@ -0,0 +1,386 @@
+import process from 'node:process';
+import chalk from 'chalk';
+import cliCursor from 'cli-cursor';
+import cliSpinners from 'cli-spinners';
+import logSymbols from 'log-symbols';
+import stripAnsi from 'strip-ansi';
+import wcwidth from 'wcwidth';
+import isInteractive from 'is-interactive';
+import isUnicodeSupported from 'is-unicode-supported';
+import {StdinDiscarder} from './utilities.js';
+
+let stdinDiscarder;
+
+class Ora {
+ #linesToClear = 0;
+ #isDiscardingStdin = false;
+ #lineCount = 0;
+ #frameIndex = 0;
+ #options;
+ #spinner;
+ #stream;
+ #id;
+ #initialInterval;
+ #isEnabled;
+ #isSilent;
+ #indent;
+ #text;
+ #prefixText;
+
+ color;
+
+ constructor(options) {
+ if (!stdinDiscarder) {
+ stdinDiscarder = new StdinDiscarder();
+ }
+
+ if (typeof options === 'string') {
+ options = {
+ text: options,
+ };
+ }
+
+ this.#options = {
+ color: 'cyan',
+ stream: process.stderr,
+ discardStdin: true,
+ hideCursor: true,
+ ...options,
+ };
+
+ // Public
+ this.color = this.#options.color;
+
+ // It's important that these use the public setters.
+ this.spinner = this.#options.spinner;
+
+ this.#initialInterval = this.#options.interval;
+ this.#stream = this.#options.stream;
+ this.#isEnabled = typeof this.#options.isEnabled === 'boolean' ? this.#options.isEnabled : isInteractive({stream: this.#stream});
+ this.#isSilent = typeof this.#options.isSilent === 'boolean' ? this.#options.isSilent : false;
+
+ // Set *after* `this.#stream`.
+ // It's important that these use the public setters.
+ this.text = this.#options.text;
+ this.prefixText = this.#options.prefixText;
+ this.indent = this.#options.indent;
+
+ if (process.env.NODE_ENV === 'test') {
+ this._stream = this.#stream;
+ this._isEnabled = this.#isEnabled;
+
+ Object.defineProperty(this, '_linesToClear', {
+ get() {
+ return this.#linesToClear;
+ },
+ set(newValue) {
+ this.#linesToClear = newValue;
+ },
+ });
+
+ Object.defineProperty(this, '_frameIndex', {
+ get() {
+ return this.#frameIndex;
+ },
+ });
+
+ Object.defineProperty(this, '_lineCount', {
+ get() {
+ return this.#lineCount;
+ },
+ });
+ }
+ }
+
+ get indent() {
+ return this.#indent;
+ }
+
+ set indent(indent = 0) {
+ if (!(indent >= 0 && Number.isInteger(indent))) {
+ throw new Error('The `indent` option must be an integer from 0 and up');
+ }
+
+ this.#indent = indent;
+ this.updateLineCount();
+ }
+
+ get interval() {
+ return this.#initialInterval || this.#spinner.interval || 100;
+ }
+
+ get spinner() {
+ return this.#spinner;
+ }
+
+ set spinner(spinner) {
+ this.#frameIndex = 0;
+ this.#initialInterval = undefined;
+
+ if (typeof spinner === 'object') {
+ if (spinner.frames === undefined) {
+ throw new Error('The given spinner must have a `frames` property');
+ }
+
+ this.#spinner = spinner;
+ } else if (!isUnicodeSupported()) {
+ this.#spinner = cliSpinners.line;
+ } else if (spinner === undefined) {
+ // Set default spinner
+ this.#spinner = cliSpinners.dots;
+ } else if (spinner !== 'default' && cliSpinners[spinner]) {
+ this.#spinner = cliSpinners[spinner];
+ } else {
+ throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);
+ }
+ }
+
+ get text() {
+ return this.#text;
+ }
+
+ set text(value) {
+ this.#text = value || '';
+ this.updateLineCount();
+ }
+
+ get prefixText() {
+ return this.#prefixText;
+ }
+
+ set prefixText(value) {
+ this.#prefixText = value || '';
+ this.updateLineCount();
+ }
+
+ get isSpinning() {
+ return this.#id !== undefined;
+ }
+
+ // TODO: Use private methods when targeting Node.js 14.
+ getFullPrefixText(prefixText = this.#prefixText, postfix = ' ') {
+ if (typeof prefixText === 'string' && prefixText !== '') {
+ return prefixText + postfix;
+ }
+
+ if (typeof prefixText === 'function') {
+ return prefixText() + postfix;
+ }
+
+ return '';
+ }
+
+ updateLineCount() {
+ const columns = this.#stream.columns || 80;
+ const fullPrefixText = this.getFullPrefixText(this.#prefixText, '-');
+
+ this.#lineCount = 0;
+ for (const line of stripAnsi(' '.repeat(this.#indent) + fullPrefixText + '--' + this.#text).split('\n')) {
+ this.#lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
+ }
+ }
+
+ get isEnabled() {
+ return this.#isEnabled && !this.#isSilent;
+ }
+
+ set isEnabled(value) {
+ if (typeof value !== 'boolean') {
+ throw new TypeError('The `isEnabled` option must be a boolean');
+ }
+
+ this.#isEnabled = value;
+ }
+
+ get isSilent() {
+ return this.#isSilent;
+ }
+
+ set isSilent(value) {
+ if (typeof value !== 'boolean') {
+ throw new TypeError('The `isSilent` option must be a boolean');
+ }
+
+ this.#isSilent = value;
+ }
+
+ frame() {
+ const {frames} = this.#spinner;
+ let frame = frames[this.#frameIndex];
+
+ if (this.color) {
+ frame = chalk[this.color](frame);
+ }
+
+ this.#frameIndex = ++this.#frameIndex % frames.length;
+ const fullPrefixText = (typeof this.#prefixText === 'string' && this.#prefixText !== '') ? this.#prefixText + ' ' : '';
+ const fullText = typeof this.text === 'string' ? ' ' + this.text : '';
+
+ return fullPrefixText + frame + fullText;
+ }
+
+ clear() {
+ if (!this.#isEnabled || !this.#stream.isTTY) {
+ return this;
+ }
+
+ this.#stream.cursorTo(0);
+
+ for (let index = 0; index < this.#linesToClear; index++) {
+ if (index > 0) {
+ this.#stream.moveCursor(0, -1);
+ }
+
+ this.#stream.clearLine(1);
+ }
+
+ if (this.#indent || this.lastIndent !== this.#indent) {
+ this.#stream.cursorTo(this.#indent);
+ }
+
+ this.lastIndent = this.#indent;
+ this.#linesToClear = 0;
+
+ return this;
+ }
+
+ render() {
+ if (this.#isSilent) {
+ return this;
+ }
+
+ this.clear();
+ this.#stream.write(this.frame());
+ this.#linesToClear = this.#lineCount;
+
+ return this;
+ }
+
+ start(text) {
+ if (text) {
+ this.text = text;
+ }
+
+ if (this.#isSilent) {
+ return this;
+ }
+
+ if (!this.#isEnabled) {
+ if (this.text) {
+ this.#stream.write(`- ${this.text}\n`);
+ }
+
+ return this;
+ }
+
+ if (this.isSpinning) {
+ return this;
+ }
+
+ if (this.#options.hideCursor) {
+ cliCursor.hide(this.#stream);
+ }
+
+ if (this.#options.discardStdin && process.stdin.isTTY) {
+ this.#isDiscardingStdin = true;
+ stdinDiscarder.start();
+ }
+
+ this.render();
+ this.#id = setInterval(this.render.bind(this), this.interval);
+
+ return this;
+ }
+
+ stop() {
+ if (!this.#isEnabled) {
+ return this;
+ }
+
+ clearInterval(this.#id);
+ this.#id = undefined;
+ this.#frameIndex = 0;
+ this.clear();
+ if (this.#options.hideCursor) {
+ cliCursor.show(this.#stream);
+ }
+
+ if (this.#options.discardStdin && process.stdin.isTTY && this.#isDiscardingStdin) {
+ stdinDiscarder.stop();
+ this.#isDiscardingStdin = false;
+ }
+
+ return this;
+ }
+
+ succeed(text) {
+ return this.stopAndPersist({symbol: logSymbols.success, text});
+ }
+
+ fail(text) {
+ return this.stopAndPersist({symbol: logSymbols.error, text});
+ }
+
+ warn(text) {
+ return this.stopAndPersist({symbol: logSymbols.warning, text});
+ }
+
+ info(text) {
+ return this.stopAndPersist({symbol: logSymbols.info, text});
+ }
+
+ stopAndPersist(options = {}) {
+ if (this.#isSilent) {
+ return this;
+ }
+
+ const prefixText = options.prefixText || this.#prefixText;
+ const text = options.text || this.text;
+ const fullText = (typeof text === 'string') ? ' ' + text : '';
+
+ this.stop();
+ this.#stream.write(`${this.getFullPrefixText(prefixText, ' ')}${options.symbol || ' '}${fullText}\n`);
+
+ return this;
+ }
+}
+
+export default function ora(options) {
+ return new Ora(options);
+}
+
+export async function oraPromise(action, options) {
+ const actionIsFunction = typeof action === 'function';
+ const actionIsPromise = typeof action.then === 'function';
+
+ if (!actionIsFunction && !actionIsPromise) {
+ throw new TypeError('Parameter `action` must be a Function or a Promise');
+ }
+
+ const {successText, failText} = typeof options === 'object'
+ ? options
+ : {successText: undefined, failText: undefined};
+
+ const spinner = ora(options).start();
+
+ try {
+ const promise = actionIsFunction ? action(spinner) : action;
+ const result = await promise;
+
+ spinner.succeed(
+ successText === undefined
+ ? undefined
+ : (typeof successText === 'string' ? successText : successText(result)),
+ );
+
+ return result;
+ } catch (error) {
+ spinner.fail(
+ failText === undefined
+ ? undefined
+ : (typeof failText === 'string' ? failText : failText(error)),
+ );
+
+ throw error;
+ }
+}
diff --git a/node_modules/ora/license b/node_modules/ora/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/ora/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/ora/node_modules/chalk/license b/node_modules/ora/node_modules/chalk/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/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/ora/node_modules/chalk/package.json b/node_modules/ora/node_modules/chalk/package.json
new file mode 100644
index 0000000..ddcf758
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/package.json
@@ -0,0 +1,81 @@
+{
+ "name": "chalk",
+ "version": "5.2.0",
+ "description": "Terminal string styling done right",
+ "license": "MIT",
+ "repository": "chalk/chalk",
+ "funding": "https://github.com/chalk/chalk?sponsor=1",
+ "type": "module",
+ "main": "./source/index.js",
+ "exports": "./source/index.js",
+ "imports": {
+ "#ansi-styles": "./source/vendor/ansi-styles/index.js",
+ "#supports-color": {
+ "node": "./source/vendor/supports-color/index.js",
+ "default": "./source/vendor/supports-color/browser.js"
+ }
+ },
+ "types": "./source/index.d.ts",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "scripts": {
+ "test": "xo && c8 ava && tsd",
+ "bench": "matcha benchmark.js"
+ },
+ "files": [
+ "source",
+ "!source/index.test-d.ts"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "devDependencies": {
+ "@types/node": "^16.11.10",
+ "ava": "^3.15.0",
+ "c8": "^7.10.0",
+ "color-convert": "^2.0.1",
+ "execa": "^6.0.0",
+ "log-update": "^5.0.0",
+ "matcha": "^0.7.0",
+ "tsd": "^0.19.0",
+ "xo": "^0.53.0",
+ "yoctodelay": "^2.0.0"
+ },
+ "xo": {
+ "rules": {
+ "unicorn/prefer-string-slice": "off",
+ "@typescript-eslint/consistent-type-imports": "off",
+ "@typescript-eslint/consistent-type-exports": "off",
+ "@typescript-eslint/consistent-type-definitions": "off"
+ }
+ },
+ "c8": {
+ "reporter": [
+ "text",
+ "lcov"
+ ],
+ "exclude": [
+ "source/vendor"
+ ]
+ }
+}
diff --git a/node_modules/ora/node_modules/chalk/readme.md b/node_modules/ora/node_modules/chalk/readme.md
new file mode 100644
index 0000000..93511c0
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/readme.md
@@ -0,0 +1,325 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="320" src="media/logo.svg" alt="Chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[![Coverage Status](https://codecov.io/gh/chalk/chalk/branch/main/graph/badge.svg)](https://codecov.io/gh/chalk/chalk)
+[![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents)
+[![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk)
+[![run on repl.it](https://img.shields.io/badge/Run_on_Replit-f26207?logo=replit&logoColor=white)](https://repl.it/github/chalk/chalk)
+
+![](media/screenshot.png)
+
+<br>
+
+---
+
+<div align="center">
+ <p>
+ <p>
+ <sup>
+ Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a>
+ </sup>
+ </p>
+ <sup>Special thanks to:</sup>
+ <br>
+ <br>
+ <a href="https://standardresume.co/tech">
+ <img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160">
+ </a>
+ <br>
+ <br>
+ <a href="https://retool.com/?utm_campaign=sindresorhus">
+ <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230">
+ </a>
+ <br>
+ <br>
+ <a href="https://strapi.io/?ref=sindresorhus">
+ <div>
+ <img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="220" alt="Strapi">
+ </div>
+ <b>Strapi is the leading open-source headless CMS.</b>
+ <div>
+ <sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
+ </div>
+ </a>
+ <br>
+ <br>
+ <a href="https://www.stackaid.us/?utm_campaign=sindre">
+ <div>
+ <img src="https://sindresorhus.com/assets/thanks/stackaid-logo.png" width="230" alt="StackAid">
+ </div>
+ <b>Fund your open source dependencies</b>
+ </a>
+ <br>
+ <br>
+ </p>
+</div>
+
+---
+
+<br>
+
+## Highlights
+
+- Expressive API
+- Highly performant
+- No dependencies
+- Ability to nest styles
+- [256/Truecolor color support](#256-and-truecolor-color-support)
+- Auto-detects color support
+- Doesn't extend `String.prototype`
+- Clean and focused
+- Actively maintained
+- [Used by ~86,000 packages](https://www.npmjs.com/browse/depended/chalk) as of October 4, 2022
+
+## Install
+
+```sh
+npm install chalk
+```
+
+**IMPORTANT:** Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. [Read more.](https://github.com/chalk/chalk/releases/tag/v5.0.0)
+
+## Usage
+
+```js
+import chalk from 'chalk';
+
+console.log(chalk.blue('Hello world!'));
+```
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+import chalk from 'chalk';
+
+const log = console.log;
+
+// Combine styled and normal strings
+log(chalk.blue('Hello') + ' World' + chalk.red('!'));
+
+// Compose multiple styles using the chainable API
+log(chalk.blue.bgRed.bold('Hello world!'));
+
+// Pass in multiple arguments
+log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
+
+// Nest styles
+log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
+
+// Nest styles of the same type even (color, underline, background)
+log(chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+));
+
+// ES2015 template literal
+log(`
+CPU: ${chalk.red('90%')}
+RAM: ${chalk.green('40%')}
+DISK: ${chalk.yellow('70%')}
+`);
+
+// Use RGB colors in terminal emulators that support it.
+log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
+log(chalk.hex('#DEADED').bold('Bold gray!'));
+```
+
+Easily define your own themes:
+
+```js
+import chalk from 'chalk';
+
+const error = chalk.bold.red;
+const warning = chalk.hex('#FFA500'); // Orange color
+
+console.log(error('Error!'));
+console.log(warning('Warning!'));
+```
+
+Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
+
+```js
+import chalk from 'chalk';
+
+const name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> 'Hello Sindre'
+```
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.level
+
+Specifies the level of color support.
+
+Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+import {Chalk} from 'chalk';
+
+const customChalk = new Chalk({level: 0});
+```
+
+| Level | Description |
+| :---: | :--- |
+| `0` | All colors disabled |
+| `1` | Basic color support (16 colors) |
+| `2` | 256 color support |
+| `3` | Truecolor support (16 million colors) |
+
+### supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+### chalkStderr and supportsColorStderr
+
+`chalkStderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `supportsColor` apply to this too. `supportsColorStderr` is exposed for convenience.
+
+### modifierNames, foregroundColorNames, backgroundColorNames, and colorNames
+
+All supported style strings are exposed as an array of strings for convenience. `colorNames` is the combination of `foregroundColorNames` and `backgroundColorNames`.
+
+This can be useful if you wrap Chalk and need to validate input:
+
+```js
+import {modifierNames, foregroundColorNames} from 'chalk';
+
+console.log(modifierNames.includes('bold'));
+//=> true
+
+console.log(foregroundColorNames.includes('pink'));
+//=> false
+```
+
+## Styles
+
+### Modifiers
+
+- `reset` - Reset the current style.
+- `bold` - Make the text bold.
+- `dim` - Make the text have lower opacity.
+- `italic` - Make the text italic. *(Not widely supported)*
+- `underline` - Put a horizontal line below the text. *(Not widely supported)*
+- `overline` - Put a horizontal line above the text. *(Not widely supported)*
+- `inverse`- Invert background and foreground colors.
+- `hidden` - Print the text but make it invisible.
+- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
+- `visible`- Print the text only when Chalk has a color level above zero. Can be useful for things that are purely cosmetic.
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `blackBright` (alias: `gray`, `grey`)
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+## 256 and Truecolor color support
+
+Chalk supports 256 colors and [Truecolor](https://github.com/termstandard/colors) (16 million colors) on supported terminal apps.
+
+Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
+
+Examples:
+
+- `chalk.hex('#DEADED').underline('Hello, world!')`
+- `chalk.rgb(15, 100, 204).inverse('Hello!')`
+
+Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `hex` for foreground colors and `bgHex` for background colors).
+
+- `chalk.bgHex('#DEADED').underline('Hello, world!')`
+- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
+
+The following color models can be used:
+
+- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
+- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
+- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
+
+## Browser support
+
+Since Chrome 69, ANSI escape codes are natively supported in the developer console.
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
+
+## Origin story
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
+
+## Related
+
+- [chalk-template](https://github.com/chalk/chalk-template) - [Tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) support for this module
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
+- [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
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
+- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
+- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
+- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
+- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
diff --git a/node_modules/ora/node_modules/chalk/source/index.d.ts b/node_modules/ora/node_modules/chalk/source/index.d.ts
new file mode 100644
index 0000000..b0cd2ae
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/index.d.ts
@@ -0,0 +1,320 @@
+// TODO: Make it this when TS suports that.
+// import {ModifierName, ForegroundColor, BackgroundColor, ColorName} from '#ansi-styles';
+// import {ColorInfo, ColorSupportLevel} from '#supports-color';
+import {ModifierName, ForegroundColorName, BackgroundColorName, ColorName} from './vendor/ansi-styles/index.js';
+import {ColorInfo, ColorSupportLevel} from './vendor/supports-color/index.js';
+
+export interface Options {
+ /**
+ Specify the color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ readonly level?: ColorSupportLevel;
+}
+
+/**
+Return a new Chalk instance.
+*/
+export const Chalk: new (options?: Options) => ChalkInstance; // eslint-disable-line @typescript-eslint/naming-convention
+
+export interface ChalkInstance {
+ (...text: unknown[]): string;
+
+ /**
+ The color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ level: ColorSupportLevel;
+
+ /**
+ Use RGB values to set text color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.rgb(222, 173, 237);
+ ```
+ */
+ rgb: (red: number, green: number, blue: number) => this;
+
+ /**
+ Use HEX value to set text color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.hex('#DEADED');
+ ```
+ */
+ hex: (color: string) => this;
+
+ /**
+ Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.ansi256(201);
+ ```
+ */
+ ansi256: (index: number) => this;
+
+ /**
+ Use RGB values to set background color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.bgRgb(222, 173, 237);
+ ```
+ */
+ bgRgb: (red: number, green: number, blue: number) => this;
+
+ /**
+ Use HEX value to set background color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.bgHex('#DEADED');
+ ```
+ */
+ bgHex: (color: string) => this;
+
+ /**
+ Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
+
+ @example
+ ```
+ import chalk from 'chalk';
+
+ chalk.bgAnsi256(201);
+ ```
+ */
+ bgAnsi256: (index: number) => this;
+
+ /**
+ Modifier: Reset the current style.
+ */
+ readonly reset: this;
+
+ /**
+ Modifier: Make the text bold.
+ */
+ readonly bold: this;
+
+ /**
+ Modifier: Make the text have lower opacity.
+ */
+ readonly dim: this;
+
+ /**
+ Modifier: Make the text italic. *(Not widely supported)*
+ */
+ readonly italic: this;
+
+ /**
+ Modifier: Put a horizontal line below the text. *(Not widely supported)*
+ */
+ readonly underline: this;
+
+ /**
+ Modifier: Put a horizontal line above the text. *(Not widely supported)*
+ */
+ readonly overline: this;
+
+ /**
+ Modifier: Invert background and foreground colors.
+ */
+ readonly inverse: this;
+
+ /**
+ Modifier: Print the text but make it invisible.
+ */
+ readonly hidden: this;
+
+ /**
+ Modifier: Puts a horizontal line through the center of the text. *(Not widely supported)*
+ */
+ readonly strikethrough: this;
+
+ /**
+ Modifier: Print the text only when Chalk has a color level above zero.
+
+ Can be useful for things that are purely cosmetic.
+ */
+ readonly visible: this;
+
+ readonly black: this;
+ readonly red: this;
+ readonly green: this;
+ readonly yellow: this;
+ readonly blue: this;
+ readonly magenta: this;
+ readonly cyan: this;
+ readonly white: this;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly gray: this;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly grey: this;
+
+ readonly blackBright: this;
+ readonly redBright: this;
+ readonly greenBright: this;
+ readonly yellowBright: this;
+ readonly blueBright: this;
+ readonly magentaBright: this;
+ readonly cyanBright: this;
+ readonly whiteBright: this;
+
+ readonly bgBlack: this;
+ readonly bgRed: this;
+ readonly bgGreen: this;
+ readonly bgYellow: this;
+ readonly bgBlue: this;
+ readonly bgMagenta: this;
+ readonly bgCyan: this;
+ readonly bgWhite: this;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: this;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: this;
+
+ readonly bgBlackBright: this;
+ readonly bgRedBright: this;
+ readonly bgGreenBright: this;
+ readonly bgYellowBright: this;
+ readonly bgBlueBright: this;
+ readonly bgMagentaBright: this;
+ readonly bgCyanBright: this;
+ readonly bgWhiteBright: this;
+}
+
+/**
+Main Chalk object that allows to chain styles together.
+
+Call the last one as a method with a string argument.
+
+Order doesn't matter, and later styles take precedent in case of a conflict.
+
+This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+*/
+declare const chalk: ChalkInstance;
+
+export const supportsColor: ColorInfo;
+
+export const chalkStderr: typeof chalk;
+export const supportsColorStderr: typeof supportsColor;
+
+export {
+ ModifierName, ForegroundColorName, BackgroundColorName, ColorName,
+ modifierNames, foregroundColorNames, backgroundColorNames, colorNames,
+// } from '#ansi-styles';
+} from './vendor/ansi-styles/index.js';
+
+export {
+ ColorInfo,
+ ColorSupport,
+ ColorSupportLevel,
+// } from '#supports-color';
+} from './vendor/supports-color/index.js';
+
+// TODO: Remove these aliases in the next major version
+/**
+@deprecated Use `ModifierName` instead.
+
+Basic modifier names.
+*/
+export type Modifiers = ModifierName;
+
+/**
+@deprecated Use `ForegroundColorName` instead.
+
+Basic foreground color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type ForegroundColor = ForegroundColorName;
+
+/**
+@deprecated Use `BackgroundColorName` instead.
+
+Basic background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type BackgroundColor = BackgroundColorName;
+
+/**
+@deprecated Use `ColorName` instead.
+
+Basic color names. The combination of foreground and background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type Color = ColorName;
+
+/**
+@deprecated Use `modifierNames` instead.
+
+Basic modifier names.
+*/
+export const modifiers: readonly Modifiers[];
+
+/**
+@deprecated Use `foregroundColorNames` instead.
+
+Basic foreground color names.
+*/
+export const foregroundColors: readonly ForegroundColor[];
+
+/**
+@deprecated Use `backgroundColorNames` instead.
+
+Basic background color names.
+*/
+export const backgroundColors: readonly BackgroundColor[];
+
+/**
+@deprecated Use `colorNames` instead.
+
+Basic color names. The combination of foreground and background color names.
+*/
+export const colors: readonly Color[];
+
+export default chalk;
diff --git a/node_modules/ora/node_modules/chalk/source/index.js b/node_modules/ora/node_modules/chalk/source/index.js
new file mode 100644
index 0000000..8bc993d
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/index.js
@@ -0,0 +1,225 @@
+import ansiStyles from '#ansi-styles';
+import supportsColor from '#supports-color';
+import { // eslint-disable-line import/order
+ stringReplaceAll,
+ stringEncaseCRLFWithFirstIndex,
+} from './utilities.js';
+
+const {stdout: stdoutColor, stderr: stderrColor} = supportsColor;
+
+const GENERATOR = Symbol('GENERATOR');
+const STYLER = Symbol('STYLER');
+const IS_EMPTY = Symbol('IS_EMPTY');
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = [
+ 'ansi',
+ 'ansi',
+ 'ansi256',
+ 'ansi16m',
+];
+
+const styles = Object.create(null);
+
+const applyOptions = (object, options = {}) => {
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
+ throw new Error('The `level` option should be an integer from 0 to 3');
+ }
+
+ // Detect level if not set manually
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
+ object.level = options.level === undefined ? colorLevel : options.level;
+};
+
+export class Chalk {
+ constructor(options) {
+ // eslint-disable-next-line no-constructor-return
+ return chalkFactory(options);
+ }
+}
+
+const chalkFactory = options => {
+ const chalk = (...strings) => strings.join(' ');
+ applyOptions(chalk, options);
+
+ Object.setPrototypeOf(chalk, createChalk.prototype);
+
+ return chalk;
+};
+
+function createChalk(options) {
+ return chalkFactory(options);
+}
+
+Object.setPrototypeOf(createChalk.prototype, Function.prototype);
+
+for (const [styleName, style] of Object.entries(ansiStyles)) {
+ styles[styleName] = {
+ get() {
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
+ Object.defineProperty(this, styleName, {value: builder});
+ return builder;
+ },
+ };
+}
+
+styles.visible = {
+ get() {
+ const builder = createBuilder(this, this[STYLER], true);
+ Object.defineProperty(this, 'visible', {value: builder});
+ return builder;
+ },
+};
+
+const getModelAnsi = (model, level, type, ...arguments_) => {
+ if (model === 'rgb') {
+ if (level === 'ansi16m') {
+ return ansiStyles[type].ansi16m(...arguments_);
+ }
+
+ if (level === 'ansi256') {
+ return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
+ }
+
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
+ }
+
+ if (model === 'hex') {
+ return getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));
+ }
+
+ return ansiStyles[type][model](...arguments_);
+};
+
+const usedModels = ['rgb', 'hex', 'ansi256'];
+
+for (const model of usedModels) {
+ styles[model] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);
+ return createBuilder(this, styler, this[IS_EMPTY]);
+ };
+ },
+ };
+
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
+ return createBuilder(this, styler, this[IS_EMPTY]);
+ };
+ },
+ };
+}
+
+const proto = Object.defineProperties(() => {}, {
+ ...styles,
+ level: {
+ enumerable: true,
+ get() {
+ return this[GENERATOR].level;
+ },
+ set(level) {
+ this[GENERATOR].level = level;
+ },
+ },
+});
+
+const createStyler = (open, close, parent) => {
+ let openAll;
+ let closeAll;
+ if (parent === undefined) {
+ openAll = open;
+ closeAll = close;
+ } else {
+ openAll = parent.openAll + open;
+ closeAll = close + parent.closeAll;
+ }
+
+ return {
+ open,
+ close,
+ openAll,
+ closeAll,
+ parent,
+ };
+};
+
+const createBuilder = (self, _styler, _isEmpty) => {
+ // Single argument is hot path, implicit coercion is faster than anything
+ // eslint-disable-next-line no-implicit-coercion
+ const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
+
+ // We alter the prototype because we must return a function, but there is
+ // no way to create a function with a different prototype
+ Object.setPrototypeOf(builder, proto);
+
+ builder[GENERATOR] = self;
+ builder[STYLER] = _styler;
+ builder[IS_EMPTY] = _isEmpty;
+
+ return builder;
+};
+
+const applyStyle = (self, string) => {
+ if (self.level <= 0 || !string) {
+ return self[IS_EMPTY] ? '' : string;
+ }
+
+ let styler = self[STYLER];
+
+ if (styler === undefined) {
+ return string;
+ }
+
+ const {openAll, closeAll} = styler;
+ if (string.includes('\u001B')) {
+ while (styler !== undefined) {
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ string = stringReplaceAll(string, styler.close, styler.open);
+
+ styler = styler.parent;
+ }
+ }
+
+ // We can move both next actions out of loop, because remaining actions in loop won't have
+ // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
+ const lfIndex = string.indexOf('\n');
+ if (lfIndex !== -1) {
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
+ }
+
+ return openAll + string + closeAll;
+};
+
+Object.defineProperties(createChalk.prototype, styles);
+
+const chalk = createChalk();
+export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
+
+export {
+ modifierNames,
+ foregroundColorNames,
+ backgroundColorNames,
+ colorNames,
+
+ // TODO: Remove these aliases in the next major version
+ modifierNames as modifiers,
+ foregroundColorNames as foregroundColors,
+ backgroundColorNames as backgroundColors,
+ colorNames as colors,
+} from './vendor/ansi-styles/index.js';
+
+export {
+ stdoutColor as supportsColor,
+ stderrColor as supportsColorStderr,
+};
+
+export default chalk;
diff --git a/node_modules/ora/node_modules/chalk/source/utilities.js b/node_modules/ora/node_modules/chalk/source/utilities.js
new file mode 100644
index 0000000..4366dee
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/utilities.js
@@ -0,0 +1,33 @@
+// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
+export function stringReplaceAll(string, substring, replacer) {
+ let index = string.indexOf(substring);
+ if (index === -1) {
+ return string;
+ }
+
+ const substringLength = substring.length;
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ returnValue += string.slice(endIndex, index) + substring + replacer;
+ endIndex = index + substringLength;
+ index = string.indexOf(substring, endIndex);
+ } while (index !== -1);
+
+ returnValue += string.slice(endIndex);
+ return returnValue;
+}
+
+export function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ const gotCR = string[index - 1] === '\r';
+ returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
+ endIndex = index + 1;
+ index = string.indexOf('\n', endIndex);
+ } while (index !== -1);
+
+ returnValue += string.slice(endIndex);
+ return returnValue;
+}
diff --git a/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts b/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts
new file mode 100644
index 0000000..58f133a
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts
@@ -0,0 +1,236 @@
+export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention
+ /**
+ The ANSI terminal control sequence for starting this style.
+ */
+ readonly open: string;
+
+ /**
+ The ANSI terminal control sequence for ending this style.
+ */
+ readonly close: string;
+}
+
+export interface ColorBase {
+ /**
+ The ANSI terminal control sequence for ending this color.
+ */
+ readonly close: string;
+
+ ansi(code: number): string;
+
+ ansi256(code: number): string;
+
+ ansi16m(red: number, green: number, blue: number): string;
+}
+
+export interface Modifier {
+ /**
+ Resets the current color chain.
+ */
+ readonly reset: CSPair;
+
+ /**
+ Make text bold.
+ */
+ readonly bold: CSPair;
+
+ /**
+ Emitting only a small amount of light.
+ */
+ readonly dim: CSPair;
+
+ /**
+ Make text italic. (Not widely supported)
+ */
+ readonly italic: CSPair;
+
+ /**
+ Make text underline. (Not widely supported)
+ */
+ readonly underline: CSPair;
+
+ /**
+ Make text overline.
+
+ Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
+ */
+ readonly overline: CSPair;
+
+ /**
+ Inverse background and foreground colors.
+ */
+ readonly inverse: CSPair;
+
+ /**
+ Prints the text, but makes it invisible.
+ */
+ readonly hidden: CSPair;
+
+ /**
+ Puts a horizontal line through the center of the text. (Not widely supported)
+ */
+ readonly strikethrough: CSPair;
+}
+
+export interface ForegroundColor {
+ readonly black: CSPair;
+ readonly red: CSPair;
+ readonly green: CSPair;
+ readonly yellow: CSPair;
+ readonly blue: CSPair;
+ readonly cyan: CSPair;
+ readonly magenta: CSPair;
+ readonly white: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly gray: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly grey: CSPair;
+
+ readonly blackBright: CSPair;
+ readonly redBright: CSPair;
+ readonly greenBright: CSPair;
+ readonly yellowBright: CSPair;
+ readonly blueBright: CSPair;
+ readonly cyanBright: CSPair;
+ readonly magentaBright: CSPair;
+ readonly whiteBright: CSPair;
+}
+
+export interface BackgroundColor {
+ readonly bgBlack: CSPair;
+ readonly bgRed: CSPair;
+ readonly bgGreen: CSPair;
+ readonly bgYellow: CSPair;
+ readonly bgBlue: CSPair;
+ readonly bgCyan: CSPair;
+ readonly bgMagenta: CSPair;
+ readonly bgWhite: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: CSPair;
+
+ readonly bgBlackBright: CSPair;
+ readonly bgRedBright: CSPair;
+ readonly bgGreenBright: CSPair;
+ readonly bgYellowBright: CSPair;
+ readonly bgBlueBright: CSPair;
+ readonly bgCyanBright: CSPair;
+ readonly bgMagentaBright: CSPair;
+ readonly bgWhiteBright: CSPair;
+}
+
+export interface ConvertColor {
+ /**
+ Convert from the RGB color space to the ANSI 256 color space.
+
+ @param red - (`0...255`)
+ @param green - (`0...255`)
+ @param blue - (`0...255`)
+ */
+ rgbToAnsi256(red: number, green: number, blue: number): number;
+
+ /**
+ Convert from the RGB HEX color space to the RGB color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hexToRgb(hex: string): [red: number, green: number, blue: number];
+
+ /**
+ Convert from the RGB HEX color space to the ANSI 256 color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hexToAnsi256(hex: string): number;
+
+ /**
+ Convert from the ANSI 256 color space to the ANSI 16 color space.
+
+ @param code - A number representing the ANSI 256 color.
+ */
+ ansi256ToAnsi(code: number): number;
+
+ /**
+ Convert from the RGB color space to the ANSI 16 color space.
+
+ @param red - (`0...255`)
+ @param green - (`0...255`)
+ @param blue - (`0...255`)
+ */
+ rgbToAnsi(red: number, green: number, blue: number): number;
+
+ /**
+ Convert from the RGB HEX color space to the ANSI 16 color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hexToAnsi(hex: string): number;
+}
+
+/**
+Basic modifier names.
+*/
+export type ModifierName = keyof Modifier;
+
+/**
+Basic foreground color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type ForegroundColorName = keyof ForegroundColor;
+
+/**
+Basic background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type BackgroundColorName = keyof BackgroundColor;
+
+/**
+Basic color names. The combination of foreground and background color names.
+
+[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
+*/
+export type ColorName = ForegroundColorName | BackgroundColorName;
+
+/**
+Basic modifier names.
+*/
+export const modifierNames: readonly ModifierName[];
+
+/**
+Basic foreground color names.
+*/
+export const foregroundColorNames: readonly ForegroundColorName[];
+
+/**
+Basic background color names.
+*/
+export const backgroundColorNames: readonly BackgroundColorName[];
+
+/*
+Basic color names. The combination of foreground and background color names.
+*/
+export const colorNames: readonly ColorName[];
+
+declare const ansiStyles: {
+ readonly modifier: Modifier;
+ readonly color: ColorBase & ForegroundColor;
+ readonly bgColor: ColorBase & BackgroundColor;
+ readonly codes: ReadonlyMap<number, number>;
+} & ForegroundColor & BackgroundColor & Modifier & ConvertColor;
+
+export default ansiStyles;
diff --git a/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js b/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
new file mode 100644
index 0000000..eaa7bed
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
@@ -0,0 +1,223 @@
+const ANSI_BACKGROUND_OFFSET = 10;
+
+const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
+
+const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
+
+const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
+
+const styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ overline: [53, 55],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29],
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+
+ // Bright color
+ blackBright: [90, 39],
+ gray: [90, 39], // Alias of `blackBright`
+ grey: [90, 39], // Alias of `blackBright`
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39],
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgGray: [100, 49], // Alias of `bgBlackBright`
+ bgGrey: [100, 49], // Alias of `bgBlackBright`
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49],
+ },
+};
+
+export const modifierNames = Object.keys(styles.modifier);
+export const foregroundColorNames = Object.keys(styles.color);
+export const backgroundColorNames = Object.keys(styles.bgColor);
+export const colorNames = [...foregroundColorNames, ...backgroundColorNames];
+
+function assembleStyles() {
+ const codes = new Map();
+
+ for (const [groupName, group] of Object.entries(styles)) {
+ for (const [styleName, style] of Object.entries(group)) {
+ styles[styleName] = {
+ open: `\u001B[${style[0]}m`,
+ close: `\u001B[${style[1]}m`,
+ };
+
+ group[styleName] = styles[styleName];
+
+ codes.set(style[0], style[1]);
+ }
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false,
+ });
+ }
+
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false,
+ });
+
+ styles.color.close = '\u001B[39m';
+ styles.bgColor.close = '\u001B[49m';
+
+ styles.color.ansi = wrapAnsi16();
+ styles.color.ansi256 = wrapAnsi256();
+ styles.color.ansi16m = wrapAnsi16m();
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
+
+ // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
+ Object.defineProperties(styles, {
+ rgbToAnsi256: {
+ value(red, green, blue) {
+ // We use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (red === green && green === blue) {
+ if (red < 8) {
+ return 16;
+ }
+
+ if (red > 248) {
+ return 231;
+ }
+
+ return Math.round(((red - 8) / 247) * 24) + 232;
+ }
+
+ return 16
+ + (36 * Math.round(red / 255 * 5))
+ + (6 * Math.round(green / 255 * 5))
+ + Math.round(blue / 255 * 5);
+ },
+ enumerable: false,
+ },
+ hexToRgb: {
+ value(hex) {
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
+ if (!matches) {
+ return [0, 0, 0];
+ }
+
+ let [colorString] = matches;
+
+ if (colorString.length === 3) {
+ colorString = [...colorString].map(character => character + character).join('');
+ }
+
+ const integer = Number.parseInt(colorString, 16);
+
+ return [
+ /* eslint-disable no-bitwise */
+ (integer >> 16) & 0xFF,
+ (integer >> 8) & 0xFF,
+ integer & 0xFF,
+ /* eslint-enable no-bitwise */
+ ];
+ },
+ enumerable: false,
+ },
+ hexToAnsi256: {
+ value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
+ enumerable: false,
+ },
+ ansi256ToAnsi: {
+ value(code) {
+ if (code < 8) {
+ return 30 + code;
+ }
+
+ if (code < 16) {
+ return 90 + (code - 8);
+ }
+
+ let red;
+ let green;
+ let blue;
+
+ if (code >= 232) {
+ red = (((code - 232) * 10) + 8) / 255;
+ green = red;
+ blue = red;
+ } else {
+ code -= 16;
+
+ const remainder = code % 36;
+
+ red = Math.floor(code / 36) / 5;
+ green = Math.floor(remainder / 6) / 5;
+ blue = (remainder % 6) / 5;
+ }
+
+ const value = Math.max(red, green, blue) * 2;
+
+ if (value === 0) {
+ return 30;
+ }
+
+ // eslint-disable-next-line no-bitwise
+ let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
+
+ if (value === 2) {
+ result += 60;
+ }
+
+ return result;
+ },
+ enumerable: false,
+ },
+ rgbToAnsi: {
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
+ enumerable: false,
+ },
+ hexToAnsi: {
+ value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
+ enumerable: false,
+ },
+ });
+
+ return styles;
+}
+
+const ansiStyles = assembleStyles();
+
+export default ansiStyles;
diff --git a/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts
new file mode 100644
index 0000000..0e8a9cc
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts
@@ -0,0 +1 @@
+export {default} from './index.js';
diff --git a/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js
new file mode 100644
index 0000000..9fa6888
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js
@@ -0,0 +1,30 @@
+/* eslint-env browser */
+
+const level = (() => {
+ if (navigator.userAgentData) {
+ const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
+ if (brand && brand.version > 93) {
+ return 3;
+ }
+ }
+
+ if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) {
+ return 1;
+ }
+
+ return 0;
+})();
+
+const colorSupport = level !== 0 && {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3,
+};
+
+const supportsColor = {
+ stdout: colorSupport,
+ stderr: colorSupport,
+};
+
+export default supportsColor;
diff --git a/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts
new file mode 100644
index 0000000..db44a78
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts
@@ -0,0 +1,55 @@
+import type {WriteStream} from 'node:tty';
+
+export type Options = {
+ /**
+ Whether `process.argv` should be sniffed for `--color` and `--no-color` flags.
+
+ @default true
+ */
+ readonly sniffFlags?: boolean;
+};
+
+/**
+Levels:
+- `0` - All colors disabled.
+- `1` - Basic 16 colors support.
+- `2` - ANSI 256 colors support.
+- `3` - Truecolor 16 million colors support.
+*/
+export type ColorSupportLevel = 0 | 1 | 2 | 3;
+
+/**
+Detect whether the terminal supports color.
+*/
+export type ColorSupport = {
+ /**
+ The color level.
+ */
+ level: ColorSupportLevel;
+
+ /**
+ Whether basic 16 colors are supported.
+ */
+ hasBasic: boolean;
+
+ /**
+ Whether ANSI 256 colors are supported.
+ */
+ has256: boolean;
+
+ /**
+ Whether Truecolor 16 million colors are supported.
+ */
+ has16m: boolean;
+};
+
+export type ColorInfo = ColorSupport | false;
+
+export function createSupportsColor(stream?: WriteStream, options?: Options): ColorInfo;
+
+declare const supportsColor: {
+ stdout: ColorInfo;
+ stderr: ColorInfo;
+};
+
+export default supportsColor;
diff --git a/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
new file mode 100644
index 0000000..a7cea61
--- /dev/null
+++ b/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
@@ -0,0 +1,181 @@
+import process from 'node:process';
+import os from 'node:os';
+import tty from 'node:tty';
+
+// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
+function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const position = argv.indexOf(prefix + flag);
+ const terminatorPosition = argv.indexOf('--');
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
+}
+
+const {env} = process;
+
+let flagForceColor;
+if (
+ hasFlag('no-color')
+ || hasFlag('no-colors')
+ || hasFlag('color=false')
+ || hasFlag('color=never')
+) {
+ flagForceColor = 0;
+} else if (
+ hasFlag('color')
+ || hasFlag('colors')
+ || hasFlag('color=true')
+ || hasFlag('color=always')
+) {
+ flagForceColor = 1;
+}
+
+function envForceColor() {
+ if ('FORCE_COLOR' in env) {
+ if (env.FORCE_COLOR === 'true') {
+ return 1;
+ }
+
+ if (env.FORCE_COLOR === 'false') {
+ return 0;
+ }
+
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
+ }
+}
+
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3,
+ };
+}
+
+function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
+ const noFlagForceColor = envForceColor();
+ if (noFlagForceColor !== undefined) {
+ flagForceColor = noFlagForceColor;
+ }
+
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
+
+ if (forceColor === 0) {
+ return 0;
+ }
+
+ if (sniffFlags) {
+ if (hasFlag('color=16m')
+ || hasFlag('color=full')
+ || hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+ }
+
+ // Check for Azure DevOps pipelines.
+ // Has to be above the `!streamIsTTY` check.
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
+ return 1;
+ }
+
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
+ return 0;
+ }
+
+ const min = forceColor || 0;
+
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ if (process.platform === 'win32') {
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
+ const osRelease = os.release().split('.');
+ if (
+ Number(osRelease[0]) >= 10
+ && Number(osRelease[2]) >= 10_586
+ ) {
+ return Number(osRelease[2]) >= 14_931 ? 3 : 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if ('GITHUB_ACTIONS' in env) {
+ return 3;
+ }
+
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return min;
+ }
+
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
+
+ if (env.TERM === 'xterm-kitty') {
+ return 3;
+ }
+
+ if ('TERM_PROGRAM' in env) {
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app': {
+ return version >= 3 ? 3 : 2;
+ }
+
+ case 'Apple_Terminal': {
+ return 2;
+ }
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ return min;
+}
+
+export function createSupportsColor(stream, options = {}) {
+ const level = _supportsColor(stream, {
+ streamIsTTY: stream && stream.isTTY,
+ ...options,
+ });
+
+ return translateLevel(level);
+}
+
+const supportsColor = {
+ stdout: createSupportsColor({isTTY: tty.isatty(1)}),
+ stderr: createSupportsColor({isTTY: tty.isatty(2)}),
+};
+
+export default supportsColor;
diff --git a/node_modules/ora/package.json b/node_modules/ora/package.json
new file mode 100644
index 0000000..45ef518
--- /dev/null
+++ b/node_modules/ora/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "ora",
+ "version": "6.1.2",
+ "description": "Elegant terminal spinner",
+ "license": "MIT",
+ "repository": "sindresorhus/ora",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "utilities.js"
+ ],
+ "keywords": [
+ "cli",
+ "spinner",
+ "spinners",
+ "terminal",
+ "term",
+ "console",
+ "ascii",
+ "unicode",
+ "loading",
+ "indicator",
+ "progress",
+ "busy",
+ "wait",
+ "idle"
+ ],
+ "dependencies": {
+ "bl": "^5.0.0",
+ "chalk": "^5.0.0",
+ "cli-cursor": "^4.0.0",
+ "cli-spinners": "^2.6.1",
+ "is-interactive": "^2.0.0",
+ "is-unicode-supported": "^1.1.0",
+ "log-symbols": "^5.1.0",
+ "strip-ansi": "^7.0.1",
+ "wcwidth": "^1.0.1"
+ },
+ "devDependencies": {
+ "@types/node": "^17.0.18",
+ "ava": "^4.0.1",
+ "get-stream": "^6.0.1",
+ "transform-tty": "^1.0.11",
+ "tsd": "^0.19.1",
+ "xo": "^0.48.0"
+ }
+}
diff --git a/node_modules/ora/readme.md b/node_modules/ora/readme.md
new file mode 100644
index 0000000..e837459
--- /dev/null
+++ b/node_modules/ora/readme.md
@@ -0,0 +1,300 @@
+# ora
+
+> Elegant terminal spinner
+
+<p align="center">
+ <br>
+ <img src="screenshot.svg" width="500">
+ <br>
+</p>
+
+## Install
+
+```sh
+npm install ora
+```
+
+## Usage
+
+```js
+import ora from 'ora';
+
+const spinner = ora('Loading unicorns').start();
+
+setTimeout(() => {
+ spinner.color = 'yellow';
+ spinner.text = 'Loading rainbows';
+}, 1000);
+```
+
+## API
+
+### ora(text)
+### ora(options)
+
+If a string is provided, it is treated as a shortcut for [`options.text`](#text).
+
+#### options
+
+Type: `object`
+
+##### text
+
+Type: `string`
+
+Text to display after the spinner.
+
+##### prefixText
+
+Type: `string | () => string`
+
+Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
+
+##### spinner
+
+Type: `string | object`\
+Default: `'dots'` <img src="screenshot-spinner.gif" width="14">
+
+Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json). See `example.js` in this repo if you want to test out different spinners. On Windows, it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support.
+
+Or an object like:
+
+```js
+{
+ interval: 80, // Optional
+ frames: ['-', '+', '-']
+}
+```
+
+##### color
+
+Type: `string`\
+Default: `'cyan'`\
+Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`
+
+The color of the spinner.
+
+##### hideCursor
+
+Type: `boolean`\
+Default: `true`
+
+Set to `false` to stop Ora from hiding the cursor.
+
+##### indent
+
+Type: `number`\
+Default: `0`
+
+Indent the spinner with the given number of spaces.
+
+##### interval
+
+Type: `number`\
+Default: Provided by the spinner or `100`
+
+Interval between each frame.
+
+Spinners provide their own recommended interval, so you don't really need to specify this.
+
+##### stream
+
+Type: `stream.Writable`\
+Default: `process.stderr`
+
+Stream to write the output.
+
+You could for example set this to `process.stdout` instead.
+
+##### isEnabled
+
+Type: `boolean`
+
+Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
+
+Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
+
+##### isSilent
+
+Type: `boolean`\
+Default: `false`
+
+Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
+
+##### discardStdin
+
+Type: `boolean`\
+Default: `true`
+
+Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on <kbd>Enter</kbd> key presses, and prevents buffering of input while the spinner is running.
+
+This has no effect on Windows as there's no good way to implement discarding stdin properly there.
+
+### Instance
+
+#### .text <sup>get/set</sup>
+
+Change the text after the spinner.
+
+#### .prefixText <sup>get/set</sup>
+
+Change the text before the spinner.
+
+No prefix text will be displayed if set to an empty string.
+
+#### .color <sup>get/set</sup>
+
+Change the spinner color.
+
+#### .spinner <sup>get/set</sup>
+
+Change the spinner.
+
+#### .indent <sup>get/set</sup>
+
+Change the spinner indent.
+
+#### .isSpinning <sup>get</sup>
+
+A boolean of whether the instance is currently spinning.
+
+#### .interval <sup>get</sup>
+
+The interval between each frame.
+
+The interval is decided by the chosen spinner.
+
+#### .start(text?)
+
+Start the spinner. Returns the instance. Set the current text if `text` is provided.
+
+#### .stop()
+
+Stop and clear the spinner. Returns the instance.
+
+#### .succeed(text?)
+
+Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
+
+#### .fail(text?)
+
+Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
+
+#### .warn(text?)
+
+Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.
+
+#### .info(text?)
+
+Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance.
+
+#### .stopAndPersist(options?)
+
+Stop the spinner and change the symbol or text. Returns the instance. See the GIF below.
+
+##### options
+
+Type: `object`
+
+###### symbol
+
+Type: `string`\
+Default: `' '`
+
+Symbol to replace the spinner with.
+
+###### text
+
+Type: `string`\
+Default: Current `'text'`
+
+Text to be persisted after the symbol
+
+###### prefixText
+
+Type: `string`\
+Default: Current `prefixText`
+
+Text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
+
+<img src="screenshot-2.gif" width="480">
+
+#### .clear()
+
+Clear the spinner. Returns the instance.
+
+#### .render()
+
+Manually render a new frame. Returns the instance.
+
+#### .frame()
+
+Get a new frame.
+
+### oraPromise(action, text)
+### oraPromise(action, options)
+
+Starts a spinner for a promise or promise-returning function. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the promise.
+
+```js
+import {oraPromise} from 'ora';
+
+await oraPromise(somePromise);
+```
+
+#### action
+
+Type: `Promise | ((spinner: ora.Ora) => Promise)`
+
+#### options
+
+Type: `object`
+
+All of the [options](#options) plus the following:
+
+##### successText
+
+Type: `string | ((result: T) => string) | undefined`
+
+The new text of the spinner when the promise is resolved.
+
+Keeps the existing text if `undefined`.
+
+##### failText
+
+Type: `string | ((error: Error) => string) | undefined`
+
+The new text of the spinner when the promise is rejected.
+
+Keeps the existing text if `undefined`.
+
+## FAQ
+
+### How do I change the color of the text?
+
+Use [Chalk](https://github.com/chalk/chalk):
+
+```js
+import ora from 'ora';
+import chalk from 'chalk';
+
+const spinner = ora(`Loading ${chalk.red('unicorns')}`).start();
+```
+
+### Why does the spinner freeze?
+
+JavaScript is single-threaded, so synchronous operations blocks the thread, including the spinner animation. Prefer asynchronous operations whenever possible.
+
+## Related
+
+- [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal
+- [listr](https://github.com/SamVerschueren/listr) - Terminal task list
+- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinner library for Swift
+- [halo](https://github.com/ManrajGrover/halo) - Python port
+- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
+- [marquee-ora](https://github.com/joeycozza/marquee-ora) - Scrolling marquee spinner for Ora
+- [briandowns/spinner](https://github.com/briandowns/spinner) - Terminal spinner/progress indicator for Go
+- [tj/go-spin](https://github.com/tj/go-spin) - Terminal spinner package for Go
+- [observablehq.com/@victordidenko/ora](https://observablehq.com/@victordidenko/ora) - Ora port to Observable notebooks
+- [spinnies](https://github.com/jcarpanelli/spinnies) - Terminal multi-spinner library for Node.js
+- [kia](https://github.com/HarryPeach/kia) - Simple terminal spinners for Deno 🦕
diff --git a/node_modules/ora/utilities.js b/node_modules/ora/utilities.js
new file mode 100644
index 0000000..d4c9731
--- /dev/null
+++ b/node_modules/ora/utilities.js
@@ -0,0 +1,85 @@
+import process from 'node:process';
+import readline from 'node:readline';
+import {BufferListStream} from 'bl';
+
+const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code
+
+export class StdinDiscarder {
+ #requests = 0;
+ #mutedStream = new BufferListStream();
+ #ourEmit;
+ #rl;
+
+ constructor() {
+ this.#mutedStream.pipe(process.stdout);
+
+ const self = this; // eslint-disable-line unicorn/no-this-assignment
+ this.#ourEmit = function (event, data, ...args) {
+ const {stdin} = process;
+ if (self.#requests > 0 || stdin.emit === self.#ourEmit) {
+ if (event === 'keypress') { // Fixes readline behavior
+ return;
+ }
+
+ if (event === 'data' && data.includes(ASCII_ETX_CODE)) {
+ process.emit('SIGINT');
+ }
+
+ Reflect.apply(self.#ourEmit, this, [event, data, ...args]);
+ } else {
+ Reflect.apply(process.stdin.emit, this, [event, data, ...args]);
+ }
+ };
+ }
+
+ start() {
+ this.#requests++;
+
+ if (this.#requests === 1) {
+ this._realStart();
+ }
+ }
+
+ stop() {
+ if (this.#requests <= 0) {
+ throw new Error('`stop` called more times than `start`');
+ }
+
+ this.#requests--;
+
+ if (this.#requests === 0) {
+ this._realStop();
+ }
+ }
+
+ // TODO: Use private methods when targeting Node.js 14.
+ _realStart() {
+ // No known way to make it work reliably on Windows
+ if (process.platform === 'win32') {
+ return;
+ }
+
+ this.#rl = readline.createInterface({
+ input: process.stdin,
+ output: this.#mutedStream,
+ });
+
+ this.#rl.on('SIGINT', () => {
+ if (process.listenerCount('SIGINT') === 0) {
+ process.emit('SIGINT');
+ } else {
+ this.#rl.close();
+ process.kill(process.pid, 'SIGINT');
+ }
+ });
+ }
+
+ _realStop() {
+ if (process.platform === 'win32') {
+ return;
+ }
+
+ this.#rl.close();
+ this.#rl = undefined;
+ }
+}
diff --git a/node_modules/prompts/index.js b/node_modules/prompts/index.js
new file mode 100644
index 0000000..3479956
--- /dev/null
+++ b/node_modules/prompts/index.js
@@ -0,0 +1,14 @@
+function isNodeLT(tar) {
+ tar = (Array.isArray(tar) ? tar : tar.split('.')).map(Number);
+ let i=0, src=process.versions.node.split('.').map(Number);
+ for (; i < tar.length; i++) {
+ if (src[i] > tar[i]) return false;
+ if (tar[i] > src[i]) return true;
+ }
+ return false;
+}
+
+module.exports =
+ isNodeLT('8.6.0')
+ ? require('./dist/index.js')
+ : require('./lib/index.js');
diff --git a/node_modules/prompts/lib/dateparts/datepart.js b/node_modules/prompts/lib/dateparts/datepart.js
new file mode 100644
index 0000000..62b893b
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/datepart.js
@@ -0,0 +1,35 @@
+'use strict';
+
+class DatePart {
+ constructor({token, date, parts, locales}) {
+ this.token = token;
+ this.date = date || new Date();
+ this.parts = parts || [this];
+ this.locales = locales || {};
+ }
+
+ up() {}
+
+ down() {}
+
+ next() {
+ const currentIdx = this.parts.indexOf(this);
+ return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
+ }
+
+ setTo(val) {}
+
+ prev() {
+ let parts = [].concat(this.parts).reverse();
+ const currentIdx = parts.indexOf(this);
+ return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
+ }
+
+ toString() {
+ return String(this.date);
+ }
+}
+
+module.exports = DatePart;
+
+
diff --git a/node_modules/prompts/lib/dateparts/day.js b/node_modules/prompts/lib/dateparts/day.js
new file mode 100644
index 0000000..5db84fe
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/day.js
@@ -0,0 +1,42 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+const pos = n => {
+ n = n % 10;
+ return n === 1 ? 'st'
+ : n === 2 ? 'nd'
+ : n === 3 ? 'rd'
+ : 'th';
+}
+
+class Day extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setDate(this.date.getDate() + 1);
+ }
+
+ down() {
+ this.date.setDate(this.date.getDate() - 1);
+ }
+
+ setTo(val) {
+ this.date.setDate(parseInt(val.substr(-2)));
+ }
+
+ toString() {
+ let date = this.date.getDate();
+ let day = this.date.getDay();
+ return this.token === 'DD' ? String(date).padStart(2, '0')
+ : this.token === 'Do' ? date + pos(date)
+ : this.token === 'd' ? day + 1
+ : this.token === 'ddd' ? this.locales.weekdaysShort[day]
+ : this.token === 'dddd' ? this.locales.weekdays[day]
+ : date;
+ }
+}
+
+module.exports = Day;
diff --git a/node_modules/prompts/lib/dateparts/hours.js b/node_modules/prompts/lib/dateparts/hours.js
new file mode 100644
index 0000000..171b3d2
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/hours.js
@@ -0,0 +1,30 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Hours extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setHours(this.date.getHours() + 1);
+ }
+
+ down() {
+ this.date.setHours(this.date.getHours() - 1);
+ }
+
+ setTo(val) {
+ this.date.setHours(parseInt(val.substr(-2)));
+ }
+
+ toString() {
+ let hours = this.date.getHours();
+ if (/h/.test(this.token))
+ hours = (hours % 12) || 12;
+ return this.token.length > 1 ? String(hours).padStart(2, '0') : hours;
+ }
+}
+
+module.exports = Hours;
diff --git a/node_modules/prompts/lib/dateparts/index.js b/node_modules/prompts/lib/dateparts/index.js
new file mode 100644
index 0000000..dc0cc95
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = {
+ DatePart: require('./datepart'),
+ Meridiem: require('./meridiem'),
+ Day: require('./day'),
+ Hours: require('./hours'),
+ Milliseconds: require('./milliseconds'),
+ Minutes: require('./minutes'),
+ Month: require('./month'),
+ Seconds: require('./seconds'),
+ Year: require('./year'),
+}
diff --git a/node_modules/prompts/lib/dateparts/meridiem.js b/node_modules/prompts/lib/dateparts/meridiem.js
new file mode 100644
index 0000000..8488677
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/meridiem.js
@@ -0,0 +1,24 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Meridiem extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setHours((this.date.getHours() + 12) % 24);
+ }
+
+ down() {
+ this.up();
+ }
+
+ toString() {
+ let meridiem = this.date.getHours() > 12 ? 'pm' : 'am';
+ return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;
+ }
+}
+
+module.exports = Meridiem;
diff --git a/node_modules/prompts/lib/dateparts/milliseconds.js b/node_modules/prompts/lib/dateparts/milliseconds.js
new file mode 100644
index 0000000..8984270
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/milliseconds.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Milliseconds extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setMilliseconds(this.date.getMilliseconds() + 1);
+ }
+
+ down() {
+ this.date.setMilliseconds(this.date.getMilliseconds() - 1);
+ }
+
+ setTo(val) {
+ this.date.setMilliseconds(parseInt(val.substr(-(this.token.length))));
+ }
+
+ toString() {
+ return String(this.date.getMilliseconds()).padStart(4, '0')
+ .substr(0, this.token.length);
+ }
+}
+
+module.exports = Milliseconds;
diff --git a/node_modules/prompts/lib/dateparts/minutes.js b/node_modules/prompts/lib/dateparts/minutes.js
new file mode 100644
index 0000000..aa1d8f7
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/minutes.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Minutes extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setMinutes(this.date.getMinutes() + 1);
+ }
+
+ down() {
+ this.date.setMinutes(this.date.getMinutes() - 1);
+ }
+
+ setTo(val) {
+ this.date.setMinutes(parseInt(val.substr(-2)));
+ }
+
+ toString() {
+ let m = this.date.getMinutes();
+ return this.token.length > 1 ? String(m).padStart(2, '0') : m;
+ }
+}
+
+module.exports = Minutes;
diff --git a/node_modules/prompts/lib/dateparts/month.js b/node_modules/prompts/lib/dateparts/month.js
new file mode 100644
index 0000000..f656455
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/month.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Month extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setMonth(this.date.getMonth() + 1);
+ }
+
+ down() {
+ this.date.setMonth(this.date.getMonth() - 1);
+ }
+
+ setTo(val) {
+ val = parseInt(val.substr(-2)) - 1;
+ this.date.setMonth(val < 0 ? 0 : val);
+ }
+
+ toString() {
+ let month = this.date.getMonth();
+ let tl = this.token.length;
+ return tl === 2 ? String(month + 1).padStart(2, '0')
+ : tl === 3 ? this.locales.monthsShort[month]
+ : tl === 4 ? this.locales.months[month]
+ : String(month + 1);
+ }
+}
+
+module.exports = Month;
diff --git a/node_modules/prompts/lib/dateparts/seconds.js b/node_modules/prompts/lib/dateparts/seconds.js
new file mode 100644
index 0000000..0c1a1a4
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/seconds.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Seconds extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setSeconds(this.date.getSeconds() + 1);
+ }
+
+ down() {
+ this.date.setSeconds(this.date.getSeconds() - 1);
+ }
+
+ setTo(val) {
+ this.date.setSeconds(parseInt(val.substr(-2)));
+ }
+
+ toString() {
+ let s = this.date.getSeconds();
+ return this.token.length > 1 ? String(s).padStart(2, '0') : s;
+ }
+}
+
+module.exports = Seconds;
diff --git a/node_modules/prompts/lib/dateparts/year.js b/node_modules/prompts/lib/dateparts/year.js
new file mode 100644
index 0000000..f068e43
--- /dev/null
+++ b/node_modules/prompts/lib/dateparts/year.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const DatePart = require('./datepart');
+
+class Year extends DatePart {
+ constructor(opts={}) {
+ super(opts);
+ }
+
+ up() {
+ this.date.setFullYear(this.date.getFullYear() + 1);
+ }
+
+ down() {
+ this.date.setFullYear(this.date.getFullYear() - 1);
+ }
+
+ setTo(val) {
+ this.date.setFullYear(val.substr(-4));
+ }
+
+ toString() {
+ let year = String(this.date.getFullYear()).padStart(4, '0');
+ return this.token.length === 2 ? year.substr(-2) : year;
+ }
+}
+
+module.exports = Year;
diff --git a/node_modules/prompts/lib/elements/autocomplete.js b/node_modules/prompts/lib/elements/autocomplete.js
new file mode 100644
index 0000000..8e06da2
--- /dev/null
+++ b/node_modules/prompts/lib/elements/autocomplete.js
@@ -0,0 +1,264 @@
+'use strict';
+
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { erase, cursor } = require('sisteransi');
+const { style, clear, figures, wrap, entriesToDisplay } = require('../util');
+
+const getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);
+const getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);
+const getIndex = (arr, valOrTitle) => {
+ const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle);
+ return index > -1 ? index : undefined;
+};
+
+/**
+ * TextPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Array} opts.choices Array of auto-complete choices objects
+ * @param {Function} [opts.suggest] Filter function. Defaults to sort by title
+ * @param {Number} [opts.limit=10] Max number of results to show
+ * @param {Number} [opts.cursor=0] Cursor start position
+ * @param {String} [opts.style='default'] Render style
+ * @param {String} [opts.fallback] Fallback message - initial to default value
+ * @param {String} [opts.initial] Index of the default value
+ * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ * @param {String} [opts.noMatches] The no matches found label
+ */
+class AutocompletePrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.msg = opts.message;
+ this.suggest = opts.suggest;
+ this.choices = opts.choices;
+ this.initial = typeof opts.initial === 'number'
+ ? opts.initial
+ : getIndex(opts.choices, opts.initial);
+ this.select = this.initial || opts.cursor || 0;
+ this.i18n = { noMatches: opts.noMatches || 'no matches found' };
+ this.fallback = opts.fallback || this.initial;
+ this.clearFirst = opts.clearFirst || false;
+ this.suggestions = [];
+ this.input = '';
+ this.limit = opts.limit || 10;
+ this.cursor = 0;
+ this.transform = style.render(opts.style);
+ this.scale = this.transform.scale;
+ this.render = this.render.bind(this);
+ this.complete = this.complete.bind(this);
+ this.clear = clear('', this.out.columns);
+ this.complete(this.render);
+ this.render();
+ }
+
+ set fallback(fb) {
+ this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;
+ }
+
+ get fallback() {
+ let choice;
+ if (typeof this._fb === 'number')
+ choice = this.choices[this._fb];
+ else if (typeof this._fb === 'string')
+ choice = { title: this._fb };
+ return choice || this._fb || { title: this.i18n.noMatches };
+ }
+
+ moveSelect(i) {
+ this.select = i;
+ if (this.suggestions.length > 0)
+ this.value = getVal(this.suggestions, i);
+ else this.value = this.fallback.value;
+ this.fire();
+ }
+
+ async complete(cb) {
+ const p = (this.completing = this.suggest(this.input, this.choices));
+ const suggestions = await p;
+
+ if (this.completing !== p) return;
+ this.suggestions = suggestions
+ .map((s, i, arr) => ({ title: getTitle(arr, i), value: getVal(arr, i), description: s.description }));
+ this.completing = false;
+ const l = Math.max(suggestions.length - 1, 0);
+ this.moveSelect(Math.min(l, this.select));
+
+ cb && cb();
+ }
+
+ reset() {
+ this.input = '';
+ this.complete(() => {
+ this.moveSelect(this.initial !== void 0 ? this.initial : 0);
+ this.render();
+ });
+ this.render();
+ }
+
+ exit() {
+ if (this.clearFirst && this.input.length > 0) {
+ this.reset();
+ } else {
+ this.done = this.exited = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+ }
+
+ abort() {
+ this.done = this.aborted = true;
+ this.exited = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ submit() {
+ this.done = true;
+ this.aborted = this.exited = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ _(c, key) {
+ let s1 = this.input.slice(0, this.cursor);
+ let s2 = this.input.slice(this.cursor);
+ this.input = `${s1}${c}${s2}`;
+ this.cursor = s1.length+1;
+ this.complete(this.render);
+ this.render();
+ }
+
+ delete() {
+ if (this.cursor === 0) return this.bell();
+ let s1 = this.input.slice(0, this.cursor-1);
+ let s2 = this.input.slice(this.cursor);
+ this.input = `${s1}${s2}`;
+ this.complete(this.render);
+ this.cursor = this.cursor-1;
+ this.render();
+ }
+
+ deleteForward() {
+ if(this.cursor*this.scale >= this.rendered.length) return this.bell();
+ let s1 = this.input.slice(0, this.cursor);
+ let s2 = this.input.slice(this.cursor+1);
+ this.input = `${s1}${s2}`;
+ this.complete(this.render);
+ this.render();
+ }
+
+ first() {
+ this.moveSelect(0);
+ this.render();
+ }
+
+ last() {
+ this.moveSelect(this.suggestions.length - 1);
+ this.render();
+ }
+
+ up() {
+ if (this.select === 0) {
+ this.moveSelect(this.suggestions.length - 1);
+ } else {
+ this.moveSelect(this.select - 1);
+ }
+ this.render();
+ }
+
+ down() {
+ if (this.select === this.suggestions.length - 1) {
+ this.moveSelect(0);
+ } else {
+ this.moveSelect(this.select + 1);
+ }
+ this.render();
+ }
+
+ next() {
+ if (this.select === this.suggestions.length - 1) {
+ this.moveSelect(0);
+ } else this.moveSelect(this.select + 1);
+ this.render();
+ }
+
+ nextPage() {
+ this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));
+ this.render();
+ }
+
+ prevPage() {
+ this.moveSelect(Math.max(this.select - this.limit, 0));
+ this.render();
+ }
+
+ left() {
+ if (this.cursor <= 0) return this.bell();
+ this.cursor = this.cursor-1;
+ this.render();
+ }
+
+ right() {
+ if (this.cursor*this.scale >= this.rendered.length) return this.bell();
+ this.cursor = this.cursor+1;
+ this.render();
+ }
+
+ renderOption(v, hovered, isStart, isEnd) {
+ let desc;
+ let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' ';
+ let title = hovered ? color.cyan().underline(v.title) : v.title;
+ prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;
+ if (v.description) {
+ desc = ` - ${v.description}`;
+ if (prefix.length + title.length + desc.length >= this.out.columns
+ || v.description.split(/\r?\n/).length > 1) {
+ desc = '\n' + wrap(v.description, { margin: 3, width: this.out.columns })
+ }
+ }
+ return prefix + ' ' + title + color.gray(desc || '');
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ else this.out.write(clear(this.outputText, this.out.columns));
+ super.render();
+
+ let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit);
+
+ this.outputText = [
+ style.symbol(this.done, this.aborted, this.exited),
+ color.bold(this.msg),
+ style.delimiter(this.completing),
+ this.done && this.suggestions[this.select]
+ ? this.suggestions[this.select].title
+ : this.rendered = this.transform.render(this.input)
+ ].join(' ');
+
+ if (!this.done) {
+ const suggestions = this.suggestions
+ .slice(startIndex, endIndex)
+ .map((item, i) => this.renderOption(item,
+ this.select === i + startIndex,
+ i === 0 && startIndex > 0,
+ i + startIndex === endIndex - 1 && endIndex < this.choices.length))
+ .join('\n');
+ this.outputText += `\n` + (suggestions || color.gray(this.fallback.title));
+ }
+
+ this.out.write(erase.line + cursor.to(0) + this.outputText);
+ }
+}
+
+module.exports = AutocompletePrompt;
diff --git a/node_modules/prompts/lib/elements/autocompleteMultiselect.js b/node_modules/prompts/lib/elements/autocompleteMultiselect.js
new file mode 100644
index 0000000..b64510f
--- /dev/null
+++ b/node_modules/prompts/lib/elements/autocompleteMultiselect.js
@@ -0,0 +1,194 @@
+'use strict';
+
+const color = require('kleur');
+const { cursor } = require('sisteransi');
+const MultiselectPrompt = require('./multiselect');
+const { clear, style, figures } = require('../util');
+/**
+ * MultiselectPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Array} opts.choices Array of choice objects
+ * @param {String} [opts.hint] Hint to display
+ * @param {String} [opts.warn] Hint shown for disabled choices
+ * @param {Number} [opts.max] Max choices
+ * @param {Number} [opts.cursor=0] Cursor start position
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ */
+class AutocompleteMultiselectPrompt extends MultiselectPrompt {
+ constructor(opts={}) {
+ opts.overrideRender = true;
+ super(opts);
+ this.inputValue = '';
+ this.clear = clear('', this.out.columns);
+ this.filteredOptions = this.value;
+ this.render();
+ }
+
+ last() {
+ this.cursor = this.filteredOptions.length - 1;
+ this.render();
+ }
+ next() {
+ this.cursor = (this.cursor + 1) % this.filteredOptions.length;
+ this.render();
+ }
+
+ up() {
+ if (this.cursor === 0) {
+ this.cursor = this.filteredOptions.length - 1;
+ } else {
+ this.cursor--;
+ }
+ this.render();
+ }
+
+ down() {
+ if (this.cursor === this.filteredOptions.length - 1) {
+ this.cursor = 0;
+ } else {
+ this.cursor++;
+ }
+ this.render();
+ }
+
+ left() {
+ this.filteredOptions[this.cursor].selected = false;
+ this.render();
+ }
+
+ right() {
+ if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();
+ this.filteredOptions[this.cursor].selected = true;
+ this.render();
+ }
+
+ delete() {
+ if (this.inputValue.length) {
+ this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1);
+ this.updateFilteredOptions();
+ }
+ }
+
+ updateFilteredOptions() {
+ const currentHighlight = this.filteredOptions[this.cursor];
+ this.filteredOptions = this.value
+ .filter(v => {
+ if (this.inputValue) {
+ if (typeof v.title === 'string') {
+ if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) {
+ return true;
+ }
+ }
+ if (typeof v.value === 'string') {
+ if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return true;
+ });
+ const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight)
+ this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex;
+ this.render();
+ }
+
+ handleSpaceToggle() {
+ const v = this.filteredOptions[this.cursor];
+
+ if (v.selected) {
+ v.selected = false;
+ this.render();
+ } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {
+ return this.bell();
+ } else {
+ v.selected = true;
+ this.render();
+ }
+ }
+
+ handleInputChange(c) {
+ this.inputValue = this.inputValue + c;
+ this.updateFilteredOptions();
+ }
+
+ _(c, key) {
+ if (c === ' ') {
+ this.handleSpaceToggle();
+ } else {
+ this.handleInputChange(c);
+ }
+ }
+
+ renderInstructions() {
+ if (this.instructions === undefined || this.instructions) {
+ if (typeof this.instructions === 'string') {
+ return this.instructions;
+ }
+ return `
+Instructions:
+ ${figures.arrowUp}/${figures.arrowDown}: Highlight option
+ ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
+ [a,b,c]/delete: Filter choices
+ enter/return: Complete answer
+`;
+ }
+ return '';
+ }
+
+ renderCurrentInput() {
+ return `
+Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`;
+ }
+
+ renderOption(cursor, v, i) {
+ let title;
+ if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
+ else title = cursor === i ? color.cyan().underline(v.title) : v.title;
+ return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title
+ }
+
+ renderDoneOrInstructions() {
+ if (this.done) {
+ return this.value
+ .filter(e => e.selected)
+ .map(v => v.title)
+ .join(', ');
+ }
+
+ const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
+
+ if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {
+ output.push(color.yellow(this.warn));
+ }
+ return output.join(' ');
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ super.render();
+
+ // print prompt
+
+ let prompt = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(false),
+ this.renderDoneOrInstructions()
+ ].join(' ');
+
+ if (this.showMinError) {
+ prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
+ this.showMinError = false;
+ }
+ prompt += this.renderOptions(this.filteredOptions);
+
+ this.out.write(this.clear + prompt);
+ this.clear = clear(prompt, this.out.columns);
+ }
+}
+
+module.exports = AutocompleteMultiselectPrompt;
diff --git a/node_modules/prompts/lib/elements/confirm.js b/node_modules/prompts/lib/elements/confirm.js
new file mode 100644
index 0000000..7a9173f
--- /dev/null
+++ b/node_modules/prompts/lib/elements/confirm.js
@@ -0,0 +1,89 @@
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { style, clear } = require('../util');
+const { erase, cursor } = require('sisteransi');
+
+/**
+ * ConfirmPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Boolean} [opts.initial] Default value (true/false)
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ * @param {String} [opts.yes] The "Yes" label
+ * @param {String} [opts.yesOption] The "Yes" option when choosing between yes/no
+ * @param {String} [opts.no] The "No" label
+ * @param {String} [opts.noOption] The "No" option when choosing between yes/no
+ */
+class ConfirmPrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.msg = opts.message;
+ this.value = opts.initial;
+ this.initialValue = !!opts.initial;
+ this.yesMsg = opts.yes || 'yes';
+ this.yesOption = opts.yesOption || '(Y/n)';
+ this.noMsg = opts.no || 'no';
+ this.noOption = opts.noOption || '(y/N)';
+ this.render();
+ }
+
+ reset() {
+ this.value = this.initialValue;
+ this.fire();
+ this.render();
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ this.done = this.aborted = true;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ submit() {
+ this.value = this.value || false;
+ this.done = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ _(c, key) {
+ if (c.toLowerCase() === 'y') {
+ this.value = true;
+ return this.submit();
+ }
+ if (c.toLowerCase() === 'n') {
+ this.value = false;
+ return this.submit();
+ }
+ return this.bell();
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ else this.out.write(clear(this.outputText, this.out.columns));
+ super.render();
+
+ this.outputText = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(this.done),
+ this.done ? (this.value ? this.yesMsg : this.noMsg)
+ : color.gray(this.initialValue ? this.yesOption : this.noOption)
+ ].join(' ');
+
+ this.out.write(erase.line + cursor.to(0) + this.outputText);
+ }
+}
+
+module.exports = ConfirmPrompt;
diff --git a/node_modules/prompts/lib/elements/date.js b/node_modules/prompts/lib/elements/date.js
new file mode 100644
index 0000000..71ff608
--- /dev/null
+++ b/node_modules/prompts/lib/elements/date.js
@@ -0,0 +1,209 @@
+'use strict';
+
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { style, clear, figures } = require('../util');
+const { erase, cursor } = require('sisteransi');
+const { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require('../dateparts');
+
+const regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;
+const regexGroups = {
+ 1: ({token}) => token.replace(/\\(.)/g, '$1'),
+ 2: (opts) => new Day(opts), // Day // TODO
+ 3: (opts) => new Month(opts), // Month
+ 4: (opts) => new Year(opts), // Year
+ 5: (opts) => new Meridiem(opts), // AM/PM // TODO (special)
+ 6: (opts) => new Hours(opts), // Hours
+ 7: (opts) => new Minutes(opts), // Minutes
+ 8: (opts) => new Seconds(opts), // Seconds
+ 9: (opts) => new Milliseconds(opts), // Fractional seconds
+}
+
+const dfltLocales = {
+ months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),
+ monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
+ weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),
+ weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',')
+}
+
+
+/**
+ * DatePrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Number} [opts.initial] Index of default value
+ * @param {String} [opts.mask] The format mask
+ * @param {object} [opts.locales] The date locales
+ * @param {String} [opts.error] The error message shown on invalid value
+ * @param {Function} [opts.validate] Function to validate the submitted value
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ */
+class DatePrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.msg = opts.message;
+ this.cursor = 0;
+ this.typed = '';
+ this.locales = Object.assign(dfltLocales, opts.locales);
+ this._date = opts.initial || new Date();
+ this.errorMsg = opts.error || 'Please Enter A Valid Value';
+ this.validator = opts.validate || (() => true);
+ this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss';
+ this.clear = clear('', this.out.columns);
+ this.render();
+ }
+
+ get value() {
+ return this.date
+ }
+
+ get date() {
+ return this._date;
+ }
+
+ set date(date) {
+ if (date) this._date.setTime(date.getTime());
+ }
+
+ set mask(mask) {
+ let result;
+ this.parts = [];
+ while(result = regex.exec(mask)) {
+ let match = result.shift();
+ let idx = result.findIndex(gr => gr != null);
+ this.parts.push(idx in regexGroups
+ ? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales })
+ : result[idx] || match);
+ }
+
+ let parts = this.parts.reduce((arr, i) => {
+ if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string')
+ arr[arr.length - 1] += i;
+ else arr.push(i);
+ return arr;
+ }, []);
+
+ this.parts.splice(0);
+ this.parts.push(...parts);
+ this.reset();
+ }
+
+ moveCursor(n) {
+ this.typed = '';
+ this.cursor = n;
+ this.fire();
+ }
+
+ reset() {
+ this.moveCursor(this.parts.findIndex(p => p instanceof DatePart));
+ this.fire();
+ this.render();
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ this.done = this.aborted = true;
+ this.error = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ async validate() {
+ let valid = await this.validator(this.value);
+ if (typeof valid === 'string') {
+ this.errorMsg = valid;
+ valid = false;
+ }
+ this.error = !valid;
+ }
+
+ async submit() {
+ await this.validate();
+ if (this.error) {
+ this.color = 'red';
+ this.fire();
+ this.render();
+ return;
+ }
+ this.done = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ up() {
+ this.typed = '';
+ this.parts[this.cursor].up();
+ this.render();
+ }
+
+ down() {
+ this.typed = '';
+ this.parts[this.cursor].down();
+ this.render();
+ }
+
+ left() {
+ let prev = this.parts[this.cursor].prev();
+ if (prev == null) return this.bell();
+ this.moveCursor(this.parts.indexOf(prev));
+ this.render();
+ }
+
+ right() {
+ let next = this.parts[this.cursor].next();
+ if (next == null) return this.bell();
+ this.moveCursor(this.parts.indexOf(next));
+ this.render();
+ }
+
+ next() {
+ let next = this.parts[this.cursor].next();
+ this.moveCursor(next
+ ? this.parts.indexOf(next)
+ : this.parts.findIndex((part) => part instanceof DatePart));
+ this.render();
+ }
+
+ _(c) {
+ if (/\d/.test(c)) {
+ this.typed += c;
+ this.parts[this.cursor].setTo(this.typed);
+ this.render();
+ }
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ else this.out.write(clear(this.outputText, this.out.columns));
+ super.render();
+
+ // Print prompt
+ this.outputText = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(false),
+ this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), [])
+ .join('')
+ ].join(' ');
+
+ // Print error
+ if (this.error) {
+ this.outputText += this.errorMsg.split('\n').reduce(
+ (a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
+ }
+
+ this.out.write(erase.line + cursor.to(0) + this.outputText);
+ }
+}
+
+module.exports = DatePrompt;
diff --git a/node_modules/prompts/lib/elements/index.js b/node_modules/prompts/lib/elements/index.js
new file mode 100644
index 0000000..2556dd0
--- /dev/null
+++ b/node_modules/prompts/lib/elements/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = {
+ TextPrompt: require('./text'),
+ SelectPrompt: require('./select'),
+ TogglePrompt: require('./toggle'),
+ DatePrompt: require('./date'),
+ NumberPrompt: require('./number'),
+ MultiselectPrompt: require('./multiselect'),
+ AutocompletePrompt: require('./autocomplete'),
+ AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'),
+ ConfirmPrompt: require('./confirm')
+};
diff --git a/node_modules/prompts/lib/elements/multiselect.js b/node_modules/prompts/lib/elements/multiselect.js
new file mode 100644
index 0000000..99b393f
--- /dev/null
+++ b/node_modules/prompts/lib/elements/multiselect.js
@@ -0,0 +1,271 @@
+'use strict';
+
+const color = require('kleur');
+const { cursor } = require('sisteransi');
+const Prompt = require('./prompt');
+const { clear, figures, style, wrap, entriesToDisplay } = require('../util');
+
+/**
+ * MultiselectPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Array} opts.choices Array of choice objects
+ * @param {String} [opts.hint] Hint to display
+ * @param {String} [opts.warn] Hint shown for disabled choices
+ * @param {Number} [opts.max] Max choices
+ * @param {Number} [opts.cursor=0] Cursor start position
+ * @param {Number} [opts.optionsPerPage=10] Max options to display at once
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ */
+class MultiselectPrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.msg = opts.message;
+ this.cursor = opts.cursor || 0;
+ this.scrollIndex = opts.cursor || 0;
+ this.hint = opts.hint || '';
+ this.warn = opts.warn || '- This option is disabled -';
+ this.minSelected = opts.min;
+ this.showMinError = false;
+ this.maxChoices = opts.max;
+ this.instructions = opts.instructions;
+ this.optionsPerPage = opts.optionsPerPage || 10;
+ this.value = opts.choices.map((ch, idx) => {
+ if (typeof ch === 'string')
+ ch = {title: ch, value: idx};
+ return {
+ title: ch && (ch.title || ch.value || ch),
+ description: ch && ch.description,
+ value: ch && (ch.value === undefined ? idx : ch.value),
+ selected: ch && ch.selected,
+ disabled: ch && ch.disabled
+ };
+ });
+ this.clear = clear('', this.out.columns);
+ if (!opts.overrideRender) {
+ this.render();
+ }
+ }
+
+ reset() {
+ this.value.map(v => !v.selected);
+ this.cursor = 0;
+ this.fire();
+ this.render();
+ }
+
+ selected() {
+ return this.value.filter(v => v.selected);
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ this.done = this.aborted = true;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ submit() {
+ const selected = this.value
+ .filter(e => e.selected);
+ if (this.minSelected && selected.length < this.minSelected) {
+ this.showMinError = true;
+ this.render();
+ } else {
+ this.done = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+ }
+
+ first() {
+ this.cursor = 0;
+ this.render();
+ }
+
+ last() {
+ this.cursor = this.value.length - 1;
+ this.render();
+ }
+ next() {
+ this.cursor = (this.cursor + 1) % this.value.length;
+ this.render();
+ }
+
+ up() {
+ if (this.cursor === 0) {
+ this.cursor = this.value.length - 1;
+ } else {
+ this.cursor--;
+ }
+ this.render();
+ }
+
+ down() {
+ if (this.cursor === this.value.length - 1) {
+ this.cursor = 0;
+ } else {
+ this.cursor++;
+ }
+ this.render();
+ }
+
+ left() {
+ this.value[this.cursor].selected = false;
+ this.render();
+ }
+
+ right() {
+ if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();
+ this.value[this.cursor].selected = true;
+ this.render();
+ }
+
+ handleSpaceToggle() {
+ const v = this.value[this.cursor];
+
+ if (v.selected) {
+ v.selected = false;
+ this.render();
+ } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {
+ return this.bell();
+ } else {
+ v.selected = true;
+ this.render();
+ }
+ }
+
+ toggleAll() {
+ if (this.maxChoices !== undefined || this.value[this.cursor].disabled) {
+ return this.bell();
+ }
+
+ const newSelected = !this.value[this.cursor].selected;
+ this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected);
+ this.render();
+ }
+
+ _(c, key) {
+ if (c === ' ') {
+ this.handleSpaceToggle();
+ } else if (c === 'a') {
+ this.toggleAll();
+ } else {
+ return this.bell();
+ }
+ }
+
+ renderInstructions() {
+ if (this.instructions === undefined || this.instructions) {
+ if (typeof this.instructions === 'string') {
+ return this.instructions;
+ }
+ return '\nInstructions:\n'
+ + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n`
+ + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n`
+ + (this.maxChoices === undefined ? ` a: Toggle all\n` : '')
+ + ` enter/return: Complete answer`;
+ }
+ return '';
+ }
+
+ renderOption(cursor, v, i, arrowIndicator) {
+ const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' ';
+ let title, desc;
+
+ if (v.disabled) {
+ title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
+ } else {
+ title = cursor === i ? color.cyan().underline(v.title) : v.title;
+ if (cursor === i && v.description) {
+ desc = ` - ${v.description}`;
+ if (prefix.length + title.length + desc.length >= this.out.columns
+ || v.description.split(/\r?\n/).length > 1) {
+ desc = '\n' + wrap(v.description, { margin: prefix.length, width: this.out.columns });
+ }
+ }
+ }
+
+ return prefix + title + color.gray(desc || '');
+ }
+
+ // shared with autocompleteMultiselect
+ paginateOptions(options) {
+ if (options.length === 0) {
+ return color.red('No matches for this query.');
+ }
+
+ let { startIndex, endIndex } = entriesToDisplay(this.cursor, options.length, this.optionsPerPage);
+ let prefix, styledOptions = [];
+
+ for (let i = startIndex; i < endIndex; i++) {
+ if (i === startIndex && startIndex > 0) {
+ prefix = figures.arrowUp;
+ } else if (i === endIndex - 1 && endIndex < options.length) {
+ prefix = figures.arrowDown;
+ } else {
+ prefix = ' ';
+ }
+ styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
+ }
+
+ return '\n' + styledOptions.join('\n');
+ }
+
+ // shared with autocomleteMultiselect
+ renderOptions(options) {
+ if (!this.done) {
+ return this.paginateOptions(options);
+ }
+ return '';
+ }
+
+ renderDoneOrInstructions() {
+ if (this.done) {
+ return this.value
+ .filter(e => e.selected)
+ .map(v => v.title)
+ .join(', ');
+ }
+
+ const output = [color.gray(this.hint), this.renderInstructions()];
+
+ if (this.value[this.cursor].disabled) {
+ output.push(color.yellow(this.warn));
+ }
+ return output.join(' ');
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ super.render();
+
+ // print prompt
+ let prompt = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(false),
+ this.renderDoneOrInstructions()
+ ].join(' ');
+ if (this.showMinError) {
+ prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
+ this.showMinError = false;
+ }
+ prompt += this.renderOptions(this.value);
+
+ this.out.write(this.clear + prompt);
+ this.clear = clear(prompt, this.out.columns);
+ }
+}
+
+module.exports = MultiselectPrompt;
diff --git a/node_modules/prompts/lib/elements/number.js b/node_modules/prompts/lib/elements/number.js
new file mode 100644
index 0000000..dc3efe9
--- /dev/null
+++ b/node_modules/prompts/lib/elements/number.js
@@ -0,0 +1,213 @@
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { cursor, erase } = require('sisteransi');
+const { style, figures, clear, lines } = require('../util');
+
+const isNumber = /[0-9]/;
+const isDef = any => any !== undefined;
+const round = (number, precision) => {
+ let factor = Math.pow(10, precision);
+ return Math.round(number * factor) / factor;
+}
+
+/**
+ * NumberPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {String} [opts.style='default'] Render style
+ * @param {Number} [opts.initial] Default value
+ * @param {Number} [opts.max=+Infinity] Max value
+ * @param {Number} [opts.min=-Infinity] Min value
+ * @param {Boolean} [opts.float=false] Parse input as floats
+ * @param {Number} [opts.round=2] Round floats to x decimals
+ * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys
+ * @param {Function} [opts.validate] Validate function
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ * @param {String} [opts.error] The invalid error label
+ */
+class NumberPrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.transform = style.render(opts.style);
+ this.msg = opts.message;
+ this.initial = isDef(opts.initial) ? opts.initial : '';
+ this.float = !!opts.float;
+ this.round = opts.round || 2;
+ this.inc = opts.increment || 1;
+ this.min = isDef(opts.min) ? opts.min : -Infinity;
+ this.max = isDef(opts.max) ? opts.max : Infinity;
+ this.errorMsg = opts.error || `Please Enter A Valid Value`;
+ this.validator = opts.validate || (() => true);
+ this.color = `cyan`;
+ this.value = ``;
+ this.typed = ``;
+ this.lastHit = 0;
+ this.render();
+ }
+
+ set value(v) {
+ if (!v && v !== 0) {
+ this.placeholder = true;
+ this.rendered = color.gray(this.transform.render(`${this.initial}`));
+ this._value = ``;
+ } else {
+ this.placeholder = false;
+ this.rendered = this.transform.render(`${round(v, this.round)}`);
+ this._value = round(v, this.round);
+ }
+ this.fire();
+ }
+
+ get value() {
+ return this._value;
+ }
+
+ parse(x) {
+ return this.float ? parseFloat(x) : parseInt(x);
+ }
+
+ valid(c) {
+ return c === `-` || c === `.` && this.float || isNumber.test(c)
+ }
+
+ reset() {
+ this.typed = ``;
+ this.value = ``;
+ this.fire();
+ this.render();
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ let x = this.value;
+ this.value = x !== `` ? x : this.initial;
+ this.done = this.aborted = true;
+ this.error = false;
+ this.fire();
+ this.render();
+ this.out.write(`\n`);
+ this.close();
+ }
+
+ async validate() {
+ let valid = await this.validator(this.value);
+ if (typeof valid === `string`) {
+ this.errorMsg = valid;
+ valid = false;
+ }
+ this.error = !valid;
+ }
+
+ async submit() {
+ await this.validate();
+ if (this.error) {
+ this.color = `red`;
+ this.fire();
+ this.render();
+ return;
+ }
+ let x = this.value;
+ this.value = x !== `` ? x : this.initial;
+ this.done = true;
+ this.aborted = false;
+ this.error = false;
+ this.fire();
+ this.render();
+ this.out.write(`\n`);
+ this.close();
+ }
+
+ up() {
+ this.typed = ``;
+ if(this.value === '') {
+ this.value = this.min - this.inc;
+ }
+ if (this.value >= this.max) return this.bell();
+ this.value += this.inc;
+ this.color = `cyan`;
+ this.fire();
+ this.render();
+ }
+
+ down() {
+ this.typed = ``;
+ if(this.value === '') {
+ this.value = this.min + this.inc;
+ }
+ if (this.value <= this.min) return this.bell();
+ this.value -= this.inc;
+ this.color = `cyan`;
+ this.fire();
+ this.render();
+ }
+
+ delete() {
+ let val = this.value.toString();
+ if (val.length === 0) return this.bell();
+ this.value = this.parse((val = val.slice(0, -1))) || ``;
+ if (this.value !== '' && this.value < this.min) {
+ this.value = this.min;
+ }
+ this.color = `cyan`;
+ this.fire();
+ this.render();
+ }
+
+ next() {
+ this.value = this.initial;
+ this.fire();
+ this.render();
+ }
+
+ _(c, key) {
+ if (!this.valid(c)) return this.bell();
+
+ const now = Date.now();
+ if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed
+ this.typed += c;
+ this.lastHit = now;
+ this.color = `cyan`;
+
+ if (c === `.`) return this.fire();
+
+ this.value = Math.min(this.parse(this.typed), this.max);
+ if (this.value > this.max) this.value = this.max;
+ if (this.value < this.min) this.value = this.min;
+ this.fire();
+ this.render();
+ }
+
+ render() {
+ if (this.closed) return;
+ if (!this.firstRender) {
+ if (this.outputError)
+ this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
+ this.out.write(clear(this.outputText, this.out.columns));
+ }
+ super.render();
+ this.outputError = '';
+
+ // Print prompt
+ this.outputText = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(this.done),
+ !this.done || (!this.done && !this.placeholder)
+ ? color[this.color]().underline(this.rendered) : this.rendered
+ ].join(` `);
+
+ // Print error
+ if (this.error) {
+ this.outputError += this.errorMsg.split(`\n`)
+ .reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
+ }
+
+ this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
+ }
+}
+
+module.exports = NumberPrompt;
diff --git a/node_modules/prompts/lib/elements/prompt.js b/node_modules/prompts/lib/elements/prompt.js
new file mode 100644
index 0000000..b793330
--- /dev/null
+++ b/node_modules/prompts/lib/elements/prompt.js
@@ -0,0 +1,68 @@
+'use strict';
+
+const readline = require('readline');
+const { action } = require('../util');
+const EventEmitter = require('events');
+const { beep, cursor } = require('sisteransi');
+const color = require('kleur');
+
+/**
+ * Base prompt skeleton
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ */
+class Prompt extends EventEmitter {
+ constructor(opts={}) {
+ super();
+
+ this.firstRender = true;
+ this.in = opts.stdin || process.stdin;
+ this.out = opts.stdout || process.stdout;
+ this.onRender = (opts.onRender || (() => void 0)).bind(this);
+ const rl = readline.createInterface({ input:this.in, escapeCodeTimeout:50 });
+ readline.emitKeypressEvents(this.in, rl);
+
+ if (this.in.isTTY) this.in.setRawMode(true);
+ const isSelect = [ 'SelectPrompt', 'MultiselectPrompt' ].indexOf(this.constructor.name) > -1;
+ const keypress = (str, key) => {
+ let a = action(key, isSelect);
+ if (a === false) {
+ this._ && this._(str, key);
+ } else if (typeof this[a] === 'function') {
+ this[a](key);
+ } else {
+ this.bell();
+ }
+ };
+
+ this.close = () => {
+ this.out.write(cursor.show);
+ this.in.removeListener('keypress', keypress);
+ if (this.in.isTTY) this.in.setRawMode(false);
+ rl.close();
+ this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);
+ this.closed = true;
+ };
+
+ this.in.on('keypress', keypress);
+ }
+
+ fire() {
+ this.emit('state', {
+ value: this.value,
+ aborted: !!this.aborted,
+ exited: !!this.exited
+ });
+ }
+
+ bell() {
+ this.out.write(beep);
+ }
+
+ render() {
+ this.onRender(color);
+ if (this.firstRender) this.firstRender = false;
+ }
+}
+
+module.exports = Prompt;
diff --git a/node_modules/prompts/lib/elements/select.js b/node_modules/prompts/lib/elements/select.js
new file mode 100644
index 0000000..6d6727f
--- /dev/null
+++ b/node_modules/prompts/lib/elements/select.js
@@ -0,0 +1,175 @@
+'use strict';
+
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { style, clear, figures, wrap, entriesToDisplay } = require('../util');
+const { cursor } = require('sisteransi');
+
+/**
+ * SelectPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Array} opts.choices Array of choice objects
+ * @param {String} [opts.hint] Hint to display
+ * @param {Number} [opts.initial] Index of default value
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ * @param {Number} [opts.optionsPerPage=10] Max options to display at once
+ */
+class SelectPrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.msg = opts.message;
+ this.hint = opts.hint || '- Use arrow-keys. Return to submit.';
+ this.warn = opts.warn || '- This option is disabled';
+ this.cursor = opts.initial || 0;
+ this.choices = opts.choices.map((ch, idx) => {
+ if (typeof ch === 'string')
+ ch = {title: ch, value: idx};
+ return {
+ title: ch && (ch.title || ch.value || ch),
+ value: ch && (ch.value === undefined ? idx : ch.value),
+ description: ch && ch.description,
+ selected: ch && ch.selected,
+ disabled: ch && ch.disabled
+ };
+ });
+ this.optionsPerPage = opts.optionsPerPage || 10;
+ this.value = (this.choices[this.cursor] || {}).value;
+ this.clear = clear('', this.out.columns);
+ this.render();
+ }
+
+ moveCursor(n) {
+ this.cursor = n;
+ this.value = this.choices[n].value;
+ this.fire();
+ }
+
+ reset() {
+ this.moveCursor(0);
+ this.fire();
+ this.render();
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ this.done = this.aborted = true;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ submit() {
+ if (!this.selection.disabled) {
+ this.done = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ } else
+ this.bell();
+ }
+
+ first() {
+ this.moveCursor(0);
+ this.render();
+ }
+
+ last() {
+ this.moveCursor(this.choices.length - 1);
+ this.render();
+ }
+
+ up() {
+ if (this.cursor === 0) {
+ this.moveCursor(this.choices.length - 1);
+ } else {
+ this.moveCursor(this.cursor - 1);
+ }
+ this.render();
+ }
+
+ down() {
+ if (this.cursor === this.choices.length - 1) {
+ this.moveCursor(0);
+ } else {
+ this.moveCursor(this.cursor + 1);
+ }
+ this.render();
+ }
+
+ next() {
+ this.moveCursor((this.cursor + 1) % this.choices.length);
+ this.render();
+ }
+
+ _(c, key) {
+ if (c === ' ') return this.submit();
+ }
+
+ get selection() {
+ return this.choices[this.cursor];
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ else this.out.write(clear(this.outputText, this.out.columns));
+ super.render();
+
+ let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage);
+
+ // Print prompt
+ this.outputText = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(false),
+ this.done ? this.selection.title : this.selection.disabled
+ ? color.yellow(this.warn) : color.gray(this.hint)
+ ].join(' ');
+
+ // Print choices
+ if (!this.done) {
+ this.outputText += '\n';
+ for (let i = startIndex; i < endIndex; i++) {
+ let title, prefix, desc = '', v = this.choices[i];
+
+ // Determine whether to display "more choices" indicators
+ if (i === startIndex && startIndex > 0) {
+ prefix = figures.arrowUp;
+ } else if (i === endIndex - 1 && endIndex < this.choices.length) {
+ prefix = figures.arrowDown;
+ } else {
+ prefix = ' ';
+ }
+
+ if (v.disabled) {
+ title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
+ prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix;
+ } else {
+ title = this.cursor === i ? color.cyan().underline(v.title) : v.title;
+ prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;
+ if (v.description && this.cursor === i) {
+ desc = ` - ${v.description}`;
+ if (prefix.length + title.length + desc.length >= this.out.columns
+ || v.description.split(/\r?\n/).length > 1) {
+ desc = '\n' + wrap(v.description, { margin: 3, width: this.out.columns });
+ }
+ }
+ }
+
+ this.outputText += `${prefix} ${title}${color.gray(desc)}\n`;
+ }
+ }
+
+ this.out.write(this.outputText);
+ }
+}
+
+module.exports = SelectPrompt;
diff --git a/node_modules/prompts/lib/elements/text.js b/node_modules/prompts/lib/elements/text.js
new file mode 100644
index 0000000..ee78181
--- /dev/null
+++ b/node_modules/prompts/lib/elements/text.js
@@ -0,0 +1,208 @@
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { erase, cursor } = require('sisteransi');
+const { style, clear, lines, figures } = require('../util');
+
+/**
+ * TextPrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {String} [opts.style='default'] Render style
+ * @param {String} [opts.initial] Default value
+ * @param {Function} [opts.validate] Validate function
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ * @param {String} [opts.error] The invalid error label
+ */
+class TextPrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.transform = style.render(opts.style);
+ this.scale = this.transform.scale;
+ this.msg = opts.message;
+ this.initial = opts.initial || ``;
+ this.validator = opts.validate || (() => true);
+ this.value = ``;
+ this.errorMsg = opts.error || `Please Enter A Valid Value`;
+ this.cursor = Number(!!this.initial);
+ this.cursorOffset = 0;
+ this.clear = clear(``, this.out.columns);
+ this.render();
+ }
+
+ set value(v) {
+ if (!v && this.initial) {
+ this.placeholder = true;
+ this.rendered = color.gray(this.transform.render(this.initial));
+ } else {
+ this.placeholder = false;
+ this.rendered = this.transform.render(v);
+ }
+ this._value = v;
+ this.fire();
+ }
+
+ get value() {
+ return this._value;
+ }
+
+ reset() {
+ this.value = ``;
+ this.cursor = Number(!!this.initial);
+ this.cursorOffset = 0;
+ this.fire();
+ this.render();
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ this.value = this.value || this.initial;
+ this.done = this.aborted = true;
+ this.error = false;
+ this.red = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ async validate() {
+ let valid = await this.validator(this.value);
+ if (typeof valid === `string`) {
+ this.errorMsg = valid;
+ valid = false;
+ }
+ this.error = !valid;
+ }
+
+ async submit() {
+ this.value = this.value || this.initial;
+ this.cursorOffset = 0;
+ this.cursor = this.rendered.length;
+ await this.validate();
+ if (this.error) {
+ this.red = true;
+ this.fire();
+ this.render();
+ return;
+ }
+ this.done = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ next() {
+ if (!this.placeholder) return this.bell();
+ this.value = this.initial;
+ this.cursor = this.rendered.length;
+ this.fire();
+ this.render();
+ }
+
+ moveCursor(n) {
+ if (this.placeholder) return;
+ this.cursor = this.cursor+n;
+ this.cursorOffset += n;
+ }
+
+ _(c, key) {
+ let s1 = this.value.slice(0, this.cursor);
+ let s2 = this.value.slice(this.cursor);
+ this.value = `${s1}${c}${s2}`;
+ this.red = false;
+ this.cursor = this.placeholder ? 0 : s1.length+1;
+ this.render();
+ }
+
+ delete() {
+ if (this.isCursorAtStart()) return this.bell();
+ let s1 = this.value.slice(0, this.cursor-1);
+ let s2 = this.value.slice(this.cursor);
+ this.value = `${s1}${s2}`;
+ this.red = false;
+ if (this.isCursorAtStart()) {
+ this.cursorOffset = 0
+ } else {
+ this.cursorOffset++;
+ this.moveCursor(-1);
+ }
+ this.render();
+ }
+
+ deleteForward() {
+ if(this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell();
+ let s1 = this.value.slice(0, this.cursor);
+ let s2 = this.value.slice(this.cursor+1);
+ this.value = `${s1}${s2}`;
+ this.red = false;
+ if (this.isCursorAtEnd()) {
+ this.cursorOffset = 0;
+ } else {
+ this.cursorOffset++;
+ }
+ this.render();
+ }
+
+ first() {
+ this.cursor = 0;
+ this.render();
+ }
+
+ last() {
+ this.cursor = this.value.length;
+ this.render();
+ }
+
+ left() {
+ if (this.cursor <= 0 || this.placeholder) return this.bell();
+ this.moveCursor(-1);
+ this.render();
+ }
+
+ right() {
+ if (this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell();
+ this.moveCursor(1);
+ this.render();
+ }
+
+ isCursorAtStart() {
+ return this.cursor === 0 || (this.placeholder && this.cursor === 1);
+ }
+
+ isCursorAtEnd() {
+ return this.cursor === this.rendered.length || (this.placeholder && this.cursor === this.rendered.length + 1)
+ }
+
+ render() {
+ if (this.closed) return;
+ if (!this.firstRender) {
+ if (this.outputError)
+ this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
+ this.out.write(clear(this.outputText, this.out.columns));
+ }
+ super.render();
+ this.outputError = '';
+
+ this.outputText = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(this.done),
+ this.red ? color.red(this.rendered) : this.rendered
+ ].join(` `);
+
+ if (this.error) {
+ this.outputError += this.errorMsg.split(`\n`)
+ .reduce((a, l, i) => a + `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);
+ }
+
+ this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
+ }
+}
+
+module.exports = TextPrompt; \ No newline at end of file
diff --git a/node_modules/prompts/lib/elements/toggle.js b/node_modules/prompts/lib/elements/toggle.js
new file mode 100644
index 0000000..bad612c
--- /dev/null
+++ b/node_modules/prompts/lib/elements/toggle.js
@@ -0,0 +1,118 @@
+const color = require('kleur');
+const Prompt = require('./prompt');
+const { style, clear } = require('../util');
+const { cursor, erase } = require('sisteransi');
+
+/**
+ * TogglePrompt Base Element
+ * @param {Object} opts Options
+ * @param {String} opts.message Message
+ * @param {Boolean} [opts.initial=false] Default value
+ * @param {String} [opts.active='no'] Active label
+ * @param {String} [opts.inactive='off'] Inactive label
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
+ */
+class TogglePrompt extends Prompt {
+ constructor(opts={}) {
+ super(opts);
+ this.msg = opts.message;
+ this.value = !!opts.initial;
+ this.active = opts.active || 'on';
+ this.inactive = opts.inactive || 'off';
+ this.initialValue = this.value;
+ this.render();
+ }
+
+ reset() {
+ this.value = this.initialValue;
+ this.fire();
+ this.render();
+ }
+
+ exit() {
+ this.abort();
+ }
+
+ abort() {
+ this.done = this.aborted = true;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ submit() {
+ this.done = true;
+ this.aborted = false;
+ this.fire();
+ this.render();
+ this.out.write('\n');
+ this.close();
+ }
+
+ deactivate() {
+ if (this.value === false) return this.bell();
+ this.value = false;
+ this.render();
+ }
+
+ activate() {
+ if (this.value === true) return this.bell();
+ this.value = true;
+ this.render();
+ }
+
+ delete() {
+ this.deactivate();
+ }
+ left() {
+ this.deactivate();
+ }
+ right() {
+ this.activate();
+ }
+ down() {
+ this.deactivate();
+ }
+ up() {
+ this.activate();
+ }
+
+ next() {
+ this.value = !this.value;
+ this.fire();
+ this.render();
+ }
+
+ _(c, key) {
+ if (c === ' ') {
+ this.value = !this.value;
+ } else if (c === '1') {
+ this.value = true;
+ } else if (c === '0') {
+ this.value = false;
+ } else return this.bell();
+ this.render();
+ }
+
+ render() {
+ if (this.closed) return;
+ if (this.firstRender) this.out.write(cursor.hide);
+ else this.out.write(clear(this.outputText, this.out.columns));
+ super.render();
+
+ this.outputText = [
+ style.symbol(this.done, this.aborted),
+ color.bold(this.msg),
+ style.delimiter(this.done),
+ this.value ? this.inactive : color.cyan().underline(this.inactive),
+ color.gray('/'),
+ this.value ? color.cyan().underline(this.active) : this.active
+ ].join(' ');
+
+ this.out.write(erase.line + cursor.to(0) + this.outputText);
+ }
+}
+
+module.exports = TogglePrompt;
diff --git a/node_modules/prompts/lib/index.js b/node_modules/prompts/lib/index.js
new file mode 100644
index 0000000..a5374d5
--- /dev/null
+++ b/node_modules/prompts/lib/index.js
@@ -0,0 +1,98 @@
+'use strict';
+
+const prompts = require('./prompts');
+
+const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];
+const noop = () => {};
+
+/**
+ * Prompt for a series of questions
+ * @param {Array|Object} questions Single question object or Array of question objects
+ * @param {Function} [onSubmit] Callback function called on prompt submit
+ * @param {Function} [onCancel] Callback function called on cancel/abort
+ * @returns {Object} Object with values from user input
+ */
+async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
+ const answers = {};
+ const override = prompt._override || {};
+ questions = [].concat(questions);
+ let answer, question, quit, name, type, lastPrompt;
+
+ const getFormattedAnswer = async (question, answer, skipValidation = false) => {
+ if (!skipValidation && question.validate && question.validate(answer) !== true) {
+ return;
+ }
+ return question.format ? await question.format(answer, answers) : answer
+ };
+
+ for (question of questions) {
+ ({ name, type } = question);
+
+ // evaluate type first and skip if type is a falsy value
+ if (typeof type === 'function') {
+ type = await type(answer, { ...answers }, question)
+ question['type'] = type
+ }
+ if (!type) continue;
+
+ // if property is a function, invoke it unless it's a special function
+ for (let key in question) {
+ if (passOn.includes(key)) continue;
+ let value = question[key];
+ question[key] = typeof value === 'function' ? await value(answer, { ...answers }, lastPrompt) : value;
+ }
+
+ lastPrompt = question;
+
+ if (typeof question.message !== 'string') {
+ throw new Error('prompt message is required');
+ }
+
+ // update vars in case they changed
+ ({ name, type } = question);
+
+ if (prompts[type] === void 0) {
+ throw new Error(`prompt type (${type}) is not defined`);
+ }
+
+ if (override[question.name] !== undefined) {
+ answer = await getFormattedAnswer(question, override[question.name]);
+ if (answer !== undefined) {
+ answers[name] = answer;
+ continue;
+ }
+ }
+
+ try {
+ // Get the injected answer if there is one or prompt the user
+ answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts[type](question);
+ answers[name] = answer = await getFormattedAnswer(question, answer, true);
+ quit = await onSubmit(question, answer, answers);
+ } catch (err) {
+ quit = !(await onCancel(question, answers));
+ }
+
+ if (quit) return answers;
+ }
+
+ return answers;
+}
+
+function getInjectedAnswer(injected, deafultValue) {
+ const answer = injected.shift();
+ if (answer instanceof Error) {
+ throw answer;
+ }
+
+ return (answer === undefined) ? deafultValue : answer;
+}
+
+function inject(answers) {
+ prompt._injected = (prompt._injected || []).concat(answers);
+}
+
+function override(answers) {
+ prompt._override = Object.assign({}, answers);
+}
+
+module.exports = Object.assign(prompt, { prompt, prompts, inject, override });
diff --git a/node_modules/prompts/lib/prompts.js b/node_modules/prompts/lib/prompts.js
new file mode 100644
index 0000000..9f62556
--- /dev/null
+++ b/node_modules/prompts/lib/prompts.js
@@ -0,0 +1,206 @@
+'use strict';
+const $ = exports;
+const el = require('./elements');
+const noop = v => v;
+
+function toPrompt(type, args, opts={}) {
+ return new Promise((res, rej) => {
+ const p = new el[type](args);
+ const onAbort = opts.onAbort || noop;
+ const onSubmit = opts.onSubmit || noop;
+ const onExit = opts.onExit || noop;
+ p.on('state', args.onState || noop);
+ p.on('submit', x => res(onSubmit(x)));
+ p.on('exit', x => res(onExit(x)));
+ p.on('abort', x => rej(onAbort(x)));
+ });
+}
+
+/**
+ * Text prompt
+ * @param {string} args.message Prompt message to display
+ * @param {string} [args.initial] Default string value
+ * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
+ * @param {function} [args.onState] On state change callback
+ * @param {function} [args.validate] Function to validate user input
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.text = args => toPrompt('TextPrompt', args);
+
+/**
+ * Password prompt with masked input
+ * @param {string} args.message Prompt message to display
+ * @param {string} [args.initial] Default string value
+ * @param {function} [args.onState] On state change callback
+ * @param {function} [args.validate] Function to validate user input
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.password = args => {
+ args.style = 'password';
+ return $.text(args);
+};
+
+/**
+ * Prompt where input is invisible, like sudo
+ * @param {string} args.message Prompt message to display
+ * @param {string} [args.initial] Default string value
+ * @param {function} [args.onState] On state change callback
+ * @param {function} [args.validate] Function to validate user input
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.invisible = args => {
+ args.style = 'invisible';
+ return $.text(args);
+};
+
+/**
+ * Number prompt
+ * @param {string} args.message Prompt message to display
+ * @param {number} args.initial Default number value
+ * @param {function} [args.onState] On state change callback
+ * @param {number} [args.max] Max value
+ * @param {number} [args.min] Min value
+ * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
+ * @param {Boolean} [opts.float=false] Parse input as floats
+ * @param {Number} [opts.round=2] Round floats to x decimals
+ * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys
+ * @param {function} [args.validate] Function to validate user input
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.number = args => toPrompt('NumberPrompt', args);
+
+/**
+ * Date prompt
+ * @param {string} args.message Prompt message to display
+ * @param {number} args.initial Default number value
+ * @param {function} [args.onState] On state change callback
+ * @param {number} [args.max] Max value
+ * @param {number} [args.min] Min value
+ * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
+ * @param {Boolean} [opts.float=false] Parse input as floats
+ * @param {Number} [opts.round=2] Round floats to x decimals
+ * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys
+ * @param {function} [args.validate] Function to validate user input
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.date = args => toPrompt('DatePrompt', args);
+
+/**
+ * Classic yes/no prompt
+ * @param {string} args.message Prompt message to display
+ * @param {boolean} [args.initial=false] Default value
+ * @param {function} [args.onState] On state change callback
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.confirm = args => toPrompt('ConfirmPrompt', args);
+
+/**
+ * List prompt, split intput string by `seperator`
+ * @param {string} args.message Prompt message to display
+ * @param {string} [args.initial] Default string value
+ * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
+ * @param {string} [args.separator] String separator
+ * @param {function} [args.onState] On state change callback
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input, in form of an `Array`
+ */
+$.list = args => {
+ const sep = args.separator || ',';
+ return toPrompt('TextPrompt', args, {
+ onSubmit: str => str.split(sep).map(s => s.trim())
+ });
+};
+
+/**
+ * Toggle/switch prompt
+ * @param {string} args.message Prompt message to display
+ * @param {boolean} [args.initial=false] Default value
+ * @param {string} [args.active="on"] Text for `active` state
+ * @param {string} [args.inactive="off"] Text for `inactive` state
+ * @param {function} [args.onState] On state change callback
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.toggle = args => toPrompt('TogglePrompt', args);
+
+/**
+ * Interactive select prompt
+ * @param {string} args.message Prompt message to display
+ * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]`
+ * @param {number} [args.initial] Index of default value
+ * @param {String} [args.hint] Hint to display
+ * @param {function} [args.onState] On state change callback
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.select = args => toPrompt('SelectPrompt', args);
+
+/**
+ * Interactive multi-select / autocompleteMultiselect prompt
+ * @param {string} args.message Prompt message to display
+ * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]`
+ * @param {number} [args.max] Max select
+ * @param {string} [args.hint] Hint to display user
+ * @param {Number} [args.cursor=0] Cursor start position
+ * @param {function} [args.onState] On state change callback
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.multiselect = args => {
+ args.choices = [].concat(args.choices || []);
+ const toSelected = items => items.filter(item => item.selected).map(item => item.value);
+ return toPrompt('MultiselectPrompt', args, {
+ onAbort: toSelected,
+ onSubmit: toSelected
+ });
+};
+
+$.autocompleteMultiselect = args => {
+ args.choices = [].concat(args.choices || []);
+ const toSelected = items => items.filter(item => item.selected).map(item => item.value);
+ return toPrompt('AutocompleteMultiselectPrompt', args, {
+ onAbort: toSelected,
+ onSubmit: toSelected
+ });
+};
+
+const byTitle = (input, choices) => Promise.resolve(
+ choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())
+);
+
+/**
+ * Interactive auto-complete prompt
+ * @param {string} args.message Prompt message to display
+ * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]`
+ * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title`
+ * @param {number} [args.limit=10] Max number of results to show
+ * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
+ * @param {String} [args.initial] Index of the default value
+ * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input
+ * @param {String} [args.fallback] Fallback message - defaults to initial value
+ * @param {function} [args.onState] On state change callback
+ * @param {Stream} [args.stdin] The Readable stream to listen to
+ * @param {Stream} [args.stdout] The Writable stream to write readline data to
+ * @returns {Promise} Promise with user input
+ */
+$.autocomplete = args => {
+ args.suggest = args.suggest || byTitle;
+ args.choices = [].concat(args.choices || []);
+ return toPrompt('AutocompletePrompt', args);
+};
diff --git a/node_modules/prompts/lib/util/action.js b/node_modules/prompts/lib/util/action.js
new file mode 100644
index 0000000..fefbd94
--- /dev/null
+++ b/node_modules/prompts/lib/util/action.js
@@ -0,0 +1,39 @@
+'use strict';
+
+module.exports = (key, isSelect) => {
+ if (key.meta && key.name !== 'escape') return;
+
+ if (key.ctrl) {
+ if (key.name === 'a') return 'first';
+ if (key.name === 'c') return 'abort';
+ if (key.name === 'd') return 'abort';
+ if (key.name === 'e') return 'last';
+ if (key.name === 'g') return 'reset';
+ }
+
+ if (isSelect) {
+ if (key.name === 'j') return 'down';
+ if (key.name === 'k') return 'up';
+ }
+
+ if (key.name === 'return') return 'submit';
+ if (key.name === 'enter') return 'submit'; // ctrl + J
+ if (key.name === 'backspace') return 'delete';
+ if (key.name === 'delete') return 'deleteForward';
+ if (key.name === 'abort') return 'abort';
+ if (key.name === 'escape') return 'exit';
+ if (key.name === 'tab') return 'next';
+ if (key.name === 'pagedown') return 'nextPage';
+ if (key.name === 'pageup') return 'prevPage';
+ // TODO create home() in prompt types (e.g. TextPrompt)
+ if (key.name === 'home') return 'home';
+ // TODO create end() in prompt types (e.g. TextPrompt)
+ if (key.name === 'end') return 'end';
+
+ if (key.name === 'up') return 'up';
+ if (key.name === 'down') return 'down';
+ if (key.name === 'right') return 'right';
+ if (key.name === 'left') return 'left';
+
+ return false;
+};
diff --git a/node_modules/prompts/lib/util/clear.js b/node_modules/prompts/lib/util/clear.js
new file mode 100644
index 0000000..e4772d5
--- /dev/null
+++ b/node_modules/prompts/lib/util/clear.js
@@ -0,0 +1,22 @@
+'use strict';
+
+const strip = require('./strip');
+const { erase, cursor } = require('sisteransi');
+
+const width = str => [...strip(str)].length;
+
+/**
+ * @param {string} prompt
+ * @param {number} perLine
+ */
+module.exports = function(prompt, perLine) {
+ if (!perLine) return erase.line + cursor.to(0);
+
+ let rows = 0;
+ const lines = prompt.split(/\r?\n/);
+ for (let line of lines) {
+ rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);
+ }
+
+ return erase.lines(rows);
+};
diff --git a/node_modules/prompts/lib/util/entriesToDisplay.js b/node_modules/prompts/lib/util/entriesToDisplay.js
new file mode 100644
index 0000000..5f6efbb
--- /dev/null
+++ b/node_modules/prompts/lib/util/entriesToDisplay.js
@@ -0,0 +1,21 @@
+'use strict';
+
+/**
+ * Determine what entries should be displayed on the screen, based on the
+ * currently selected index and the maximum visible. Used in list-based
+ * prompts like `select` and `multiselect`.
+ *
+ * @param {number} cursor the currently selected entry
+ * @param {number} total the total entries available to display
+ * @param {number} [maxVisible] the number of entries that can be displayed
+ */
+module.exports = (cursor, total, maxVisible) => {
+ maxVisible = maxVisible || total;
+
+ let startIndex = Math.min(total- maxVisible, cursor - Math.floor(maxVisible / 2));
+ if (startIndex < 0) startIndex = 0;
+
+ let endIndex = Math.min(startIndex + maxVisible, total);
+
+ return { startIndex, endIndex };
+};
diff --git a/node_modules/prompts/lib/util/figures.js b/node_modules/prompts/lib/util/figures.js
new file mode 100644
index 0000000..cd31b88
--- /dev/null
+++ b/node_modules/prompts/lib/util/figures.js
@@ -0,0 +1,33 @@
+'use strict';
+
+ const main = {
+ arrowUp: '↑',
+ arrowDown: '↓',
+ arrowLeft: '←',
+ arrowRight: '→',
+ radioOn: '◉',
+ radioOff: '◯',
+ tick: '✔',
+ cross: '✖',
+ ellipsis: '…',
+ pointerSmall: '›',
+ line: '─',
+ pointer: '❯'
+};
+const win = {
+ arrowUp: main.arrowUp,
+ arrowDown: main.arrowDown,
+ arrowLeft: main.arrowLeft,
+ arrowRight: main.arrowRight,
+ radioOn: '(*)',
+ radioOff: '( )',
+ tick: '√',
+ cross: '×',
+ ellipsis: '...',
+ pointerSmall: '»',
+ line: '─',
+ pointer: '>'
+};
+const figures = process.platform === 'win32' ? win : main;
+
+ module.exports = figures;
diff --git a/node_modules/prompts/lib/util/index.js b/node_modules/prompts/lib/util/index.js
new file mode 100644
index 0000000..f815986
--- /dev/null
+++ b/node_modules/prompts/lib/util/index.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = {
+ action: require('./action'),
+ clear: require('./clear'),
+ style: require('./style'),
+ strip: require('./strip'),
+ figures: require('./figures'),
+ lines: require('./lines'),
+ wrap: require('./wrap'),
+ entriesToDisplay: require('./entriesToDisplay')
+};
diff --git a/node_modules/prompts/lib/util/lines.js b/node_modules/prompts/lib/util/lines.js
new file mode 100644
index 0000000..de30419
--- /dev/null
+++ b/node_modules/prompts/lib/util/lines.js
@@ -0,0 +1,15 @@
+'use strict';
+
+const strip = require('./strip');
+
+/**
+ * @param {string} msg
+ * @param {number} perLine
+ */
+module.exports = function (msg, perLine) {
+ let lines = String(strip(msg) || '').split(/\r?\n/);
+
+ if (!perLine) return lines.length;
+ return lines.map(l => Math.ceil(l.length / perLine))
+ .reduce((a, b) => a + b);
+};
diff --git a/node_modules/prompts/lib/util/strip.js b/node_modules/prompts/lib/util/strip.js
new file mode 100644
index 0000000..8ebf4cb
--- /dev/null
+++ b/node_modules/prompts/lib/util/strip.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = str => {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
+ ].join('|');
+
+ const RGX = new RegExp(pattern, 'g');
+ return typeof str === 'string' ? str.replace(RGX, '') : str;
+};
diff --git a/node_modules/prompts/lib/util/style.js b/node_modules/prompts/lib/util/style.js
new file mode 100644
index 0000000..1851cc7
--- /dev/null
+++ b/node_modules/prompts/lib/util/style.js
@@ -0,0 +1,40 @@
+'use strict';
+
+const c = require('kleur');
+const figures = require('./figures');
+
+// rendering user input.
+const styles = Object.freeze({
+ password: { scale: 1, render: input => '*'.repeat(input.length) },
+ emoji: { scale: 2, render: input => '😃'.repeat(input.length) },
+ invisible: { scale: 0, render: input => '' },
+ default: { scale: 1, render: input => `${input}` }
+});
+const render = type => styles[type] || styles.default;
+
+// icon to signalize a prompt.
+const symbols = Object.freeze({
+ aborted: c.red(figures.cross),
+ done: c.green(figures.tick),
+ exited: c.yellow(figures.cross),
+ default: c.cyan('?')
+});
+
+const symbol = (done, aborted, exited) =>
+ aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default;
+
+// between the question and the user's input.
+const delimiter = completing =>
+ c.gray(completing ? figures.ellipsis : figures.pointerSmall);
+
+const item = (expandable, expanded) =>
+ c.gray(expandable ? (expanded ? figures.pointerSmall : '+') : figures.line);
+
+module.exports = {
+ styles,
+ render,
+ symbols,
+ symbol,
+ delimiter,
+ item
+};
diff --git a/node_modules/prompts/lib/util/wrap.js b/node_modules/prompts/lib/util/wrap.js
new file mode 100644
index 0000000..43b5399
--- /dev/null
+++ b/node_modules/prompts/lib/util/wrap.js
@@ -0,0 +1,27 @@
+'use strict';
+
+/**
+ * @param {string} msg The message to wrap
+ * @param {object} opts
+ * @param {number|string} [opts.margin] Left margin
+ * @param {number} opts.width Maximum characters per line including the margin
+ */
+module.exports = (msg, opts = {}) => {
+ const tab = Number.isSafeInteger(parseInt(opts.margin))
+ ? new Array(parseInt(opts.margin)).fill(' ').join('')
+ : (opts.margin || '');
+
+ const width = opts.width;
+
+ return (msg || '').split(/\r?\n/g)
+ .map(line => line
+ .split(/\s+/g)
+ .reduce((arr, w) => {
+ if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width)
+ arr[arr.length - 1] += ` ${w}`;
+ else arr.push(`${tab}${w}`);
+ return arr;
+ }, [ tab ])
+ .join('\n'))
+ .join('\n');
+};
diff --git a/node_modules/prompts/license b/node_modules/prompts/license
new file mode 100644
index 0000000..13dc83c
--- /dev/null
+++ b/node_modules/prompts/license
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Terkel Gjervig Nielsen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 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/prompts/package.json b/node_modules/prompts/package.json
new file mode 100644
index 0000000..f7ba84b
--- /dev/null
+++ b/node_modules/prompts/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "prompts",
+ "version": "2.4.2",
+ "description": "Lightweight, beautiful and user-friendly prompts",
+ "license": "MIT",
+ "repository": "terkelg/prompts",
+ "main": "index.js",
+ "author": {
+ "name": "Terkel Gjervig",
+ "email": "terkel@terkel.com",
+ "url": "https://terkel.com"
+ },
+ "files": [
+ "lib",
+ "dist",
+ "index.js"
+ ],
+ "scripts": {
+ "start": "node lib/index.js",
+ "build": "babel lib -d dist",
+ "prepublishOnly": "npm run build",
+ "test": "tape test/*.js | tap-spec"
+ },
+ "keywords": [
+ "ui",
+ "prompts",
+ "cli",
+ "prompt",
+ "interface",
+ "command-line",
+ "input",
+ "command",
+ "stdin",
+ "menu",
+ "ask",
+ "interact"
+ ],
+ "dependencies": {
+ "kleur": "^3.0.3",
+ "sisteransi": "^1.0.5"
+ },
+ "devDependencies": {
+ "@babel/cli": "^7.12.1",
+ "@babel/core": "^7.12.3",
+ "@babel/plugin-proposal-object-rest-spread": "^7.12.1",
+ "@babel/preset-env": "^7.12.1",
+ "tap-spec": "^2.2.2",
+ "tape": "^4.13.3"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+}
diff --git a/node_modules/prompts/readme.md b/node_modules/prompts/readme.md
new file mode 100755
index 0000000..4a8b065
--- /dev/null
+++ b/node_modules/prompts/readme.md
@@ -0,0 +1,882 @@
+<p align="center">
+ <img src="https://github.com/terkelg/prompts/raw/master/prompts.png" alt="Prompts" width="500" />
+</p>
+
+<h1 align="center">❯ Prompts</h1>
+
+<p align="center">
+ <a href="https://npmjs.org/package/prompts">
+ <img src="https://img.shields.io/npm/v/prompts.svg" alt="version" />
+ </a>
+ <a href="https://travis-ci.org/terkelg/prompts">
+ <img src="https://img.shields.io/travis/terkelg/prompts.svg" alt="travis" />
+ </a>
+ <a href="https://npmjs.org/package/prompts">
+ <img src="https://img.shields.io/npm/dm/prompts.svg" alt="downloads" />
+ </a>
+ <!---
+ <a href="https://packagephobia.now.sh/result?p=prompts">
+ <img src="https://packagephobia.now.sh/badge?p=prompts" alt="install size" />
+ </a>
+ --->
+</p>
+
+<p align="center">
+ <b>Lightweight, beautiful and user-friendly interactive prompts</b><br />
+ <sub>>_ Easy to use CLI prompts to enquire users for information▌</sub>
+</p>
+
+<br />
+
+* **Simple**: prompts has [no big dependencies](http://npm.anvaka.com/#/view/2d/prompts) nor is it broken into a [dozen](http://npm.anvaka.com/#/view/2d/inquirer) tiny modules that only work well together.
+* **User friendly**: prompt uses layout and colors to create beautiful cli interfaces.
+* **Promised**: uses promises and `async`/`await`. No callback hell.
+* **Flexible**: all prompts are independent and can be used on their own.
+* **Testable**: provides a way to submit answers programmatically.
+* **Unified**: consistent experience across all [prompts](#-types).
+
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+
+## ❯ Install
+
+```
+$ npm install --save prompts
+```
+
+> This package supports Node 6 and above
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+## ❯ Usage
+
+<img src="https://github.com/terkelg/prompts/raw/master/media/example.gif" alt="example prompt" width="499" height="103" />
+
+```js
+const prompts = require('prompts');
+
+(async () => {
+ const response = await prompts({
+ type: 'number',
+ name: 'value',
+ message: 'How old are you?',
+ validate: value => value < 18 ? `Nightclub is 18+ only` : true
+ });
+
+ console.log(response); // => { value: 24 }
+})();
+```
+
+> See [`example.js`](https://github.com/terkelg/prompts/blob/master/example.js) for more options.
+
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+
+## ❯ Examples
+
+### Single Prompt
+
+Prompt with a single prompt object. Returns an object with the response.
+
+```js
+const prompts = require('prompts');
+
+(async () => {
+ const response = await prompts({
+ type: 'text',
+ name: 'meaning',
+ message: 'What is the meaning of life?'
+ });
+
+ console.log(response.meaning);
+})();
+```
+
+### Prompt Chain
+
+Prompt with a list of prompt objects. Returns an object with the responses.
+Make sure to give each prompt a unique `name` property to prevent overwriting values.
+
+```js
+const prompts = require('prompts');
+
+const questions = [
+ {
+ type: 'text',
+ name: 'username',
+ message: 'What is your GitHub username?'
+ },
+ {
+ type: 'number',
+ name: 'age',
+ message: 'How old are you?'
+ },
+ {
+ type: 'text',
+ name: 'about',
+ message: 'Tell something about yourself',
+ initial: 'Why should I?'
+ }
+];
+
+(async () => {
+ const response = await prompts(questions);
+
+ // => response => { username, age, about }
+})();
+```
+
+### Dynamic Prompts
+
+Prompt properties can be functions too.
+Prompt Objects with `type` set to `falsy` values are skipped.
+
+```js
+const prompts = require('prompts');
+
+const questions = [
+ {
+ type: 'text',
+ name: 'dish',
+ message: 'Do you like pizza?'
+ },
+ {
+ type: prev => prev == 'pizza' ? 'text' : null,
+ name: 'topping',
+ message: 'Name a topping'
+ }
+];
+
+(async () => {
+ const response = await prompts(questions);
+})();
+```
+
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+
+## ❯ API
+
+### prompts(prompts, options)
+
+Type: `Function`<br>
+Returns: `Object`
+
+Prompter function which takes your [prompt objects](#-prompt-objects) and returns an object with responses.
+
+
+#### prompts
+
+Type: `Array|Object`<br>
+
+Array of [prompt objects](#-prompt-objects).
+ These are the questions the user will be prompted. You can see the list of supported [prompt types here](#-types).
+
+Prompts can be submitted (<kbd>return</kbd>, <kbd>enter</kbd>) or canceled (<kbd>esc</kbd>, <kbd>abort</kbd>, <kbd>ctrl</kbd>+<kbd>c</kbd>, <kbd>ctrl</kbd>+<kbd>d</kbd>). No property is being defined on the returned response object when a prompt is canceled.
+
+#### options.onSubmit
+
+Type: `Function`<br>
+Default: `() => {}`
+
+Callback that's invoked after each prompt submission.
+Its signature is `(prompt, answer, answers)` where `prompt` is the current prompt object, `answer` the user answer to the current question and `answers` the user answers so far. Async functions are supported.
+
+Return `true` to quit the prompt chain and return all collected responses so far, otherwise continue to iterate prompt objects.
+
+**Example:**
+```js
+(async () => {
+ const questions = [{ ... }];
+ const onSubmit = (prompt, answer) => console.log(`Thanks I got ${answer} from ${prompt.name}`);
+ const response = await prompts(questions, { onSubmit });
+})();
+```
+
+#### options.onCancel
+
+Type: `Function`<br>
+Default: `() => {}`
+
+Callback that's invoked when the user cancels/exits the prompt.
+Its signature is `(prompt, answers)` where `prompt` is the current prompt object and `answers` the user answers so far. Async functions are supported.
+
+Return `true` to continue and prevent the prompt loop from aborting.
+On cancel responses collected so far are returned.
+
+**Example:**
+```js
+(async () => {
+ const questions = [{ ... }];
+ const onCancel = prompt => {
+ console.log('Never stop prompting!');
+ return true;
+ }
+ const response = await prompts(questions, { onCancel });
+})();
+```
+
+### override
+
+Type: `Function`
+
+Preanswer questions by passing an object with answers to `prompts.override`.
+Powerful when combined with arguments of process.
+
+**Example**
+```js
+const prompts = require('prompts');
+prompts.override(require('yargs').argv);
+
+(async () => {
+ const response = await prompts([
+ {
+ type: 'text',
+ name: 'twitter',
+ message: `What's your twitter handle?`
+ },
+ {
+ type: 'multiselect',
+ name: 'color',
+ message: 'Pick colors',
+ choices: [
+ { title: 'Red', value: '#ff0000' },
+ { title: 'Green', value: '#00ff00' },
+ { title: 'Blue', value: '#0000ff' }
+ ],
+ }
+ ]);
+
+ console.log(response);
+})();
+```
+
+### inject(values)
+
+Type: `Function`<br>
+
+Programmatically inject responses. This enables you to prepare the responses ahead of time.
+If any injected value is found the prompt is immediately resolved with the injected value.
+This feature is intended for testing only.
+
+#### values
+
+Type: `Array`
+
+Array with values to inject. Resolved values are removed from the internal inject array.
+Each value can be an array of values in order to provide answers for a question asked multiple times.
+If a value is an instance of `Error` it will simulate the user cancelling/exiting the prompt.
+
+**Example:**
+```js
+const prompts = require('prompts');
+
+prompts.inject([ '@terkelg', ['#ff0000', '#0000ff'] ]);
+
+(async () => {
+ const response = await prompts([
+ {
+ type: 'text',
+ name: 'twitter',
+ message: `What's your twitter handle?`
+ },
+ {
+ type: 'multiselect',
+ name: 'color',
+ message: 'Pick colors',
+ choices: [
+ { title: 'Red', value: '#ff0000' },
+ { title: 'Green', value: '#00ff00' },
+ { title: 'Blue', value: '#0000ff' }
+ ],
+ }
+ ]);
+
+ // => { twitter: 'terkelg', color: [ '#ff0000', '#0000ff' ] }
+})();
+```
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+
+## ❯ Prompt Objects
+
+Prompts Objects are JavaScript objects that define the "questions" and the [type of prompt](#-types).
+Almost all prompt objects have the following properties:
+
+```js
+{
+ type: String | Function,
+ name: String | Function,
+ message: String | Function,
+ initial: String | Function | Async Function
+ format: Function | Async Function,
+ onRender: Function
+ onState: Function
+ stdin: Readable
+ stdout: Writeable
+}
+```
+
+Each property be of type `function` and will be invoked right before prompting the user.
+
+The function signature is `(prev, values, prompt)`, where `prev` is the value from the previous prompt,
+`values` is the response object with all values collected so far and `prompt` is the previous prompt object.
+
+**Function example:**
+```js
+{
+ type: prev => prev > 3 ? 'confirm' : null,
+ name: 'confirm',
+ message: (prev, values) => `Please confirm that you eat ${values.dish} times ${prev} a day?`
+}
+```
+
+The above prompt will be skipped if the value of the previous prompt is less than 3.
+
+### type
+
+Type: `String|Function`
+
+Defines the type of prompt to display. See the list of [prompt types](#-types) for valid values.
+
+If `type` is a falsy value the prompter will skip that question.
+```js
+{
+ type: null,
+ name: 'forgetme',
+ message: `I'll never be shown anyway`,
+}
+```
+
+### name
+
+Type: `String|Function`
+
+The response will be saved under this key/property in the returned response object.
+In case you have multiple prompts with the same name only the latest response will be stored.
+
+> Make sure to give prompts unique names if you don't want to overwrite previous values.
+
+### message
+
+Type: `String|Function`
+
+The message to be displayed to the user.
+
+### initial
+
+Type: `String|Function`
+
+Optional default prompt value. Async functions are supported too.
+
+### format
+
+Type: `Function`
+
+Receive the user input and return the formatted value to be used inside the program.
+The value returned will be added to the response object.
+
+The function signature is `(val, values)`, where `val` is the value from the current prompt and
+`values` is the current response object in case you need to format based on previous responses.
+
+**Example:**
+```js
+{
+ type: 'number',
+ name: 'price',
+ message: 'Enter price',
+ format: val => Intl.NumberFormat(undefined, { style: 'currency', currency: 'USD' }).format(val);
+}
+```
+
+### onRender
+
+Type: `Function`
+
+Callback for when the prompt is rendered.
+The function receives [kleur](https://github.com/lukeed/kleur) as its first argument and `this` refers to the current prompt.
+
+**Example:**
+```js
+{
+ type: 'number',
+ message: 'This message will be overridden',
+ onRender(kleur) {
+ this.msg = kleur.cyan('Enter a number');
+ }
+}
+```
+
+### onState
+
+Type: `Function`
+
+Callback for when the state of the current prompt changes.
+The function signature is `(state)` where `state` is an object with a snapshot of the current state.
+The state object has two properties `value` and `aborted`. E.g `{ value: 'This is ', aborted: false }`
+
+### stdin and stdout
+
+Type: `Stream`
+
+By default, prompts uses `process.stdin` for receiving input and `process.stdout` for writing output.
+If you need to use different streams, for instance `process.stderr`, you can set these with the `stdin` and `stdout` properties.
+
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+
+## ❯ Types
+
+* [text](#textmessage-initial-style)
+* [password](#passwordmessage-initial)
+* [invisible](#invisiblemessage-initial)
+* [number](#numbermessage-initial-max-min-style)
+* [confirm](#confirmmessage-initial)
+* [list](#listmessage-initial)
+* [toggle](#togglemessage-initial-active-inactive)
+* [select](#selectmessage-choices-initial-hint-warn)
+* [multiselect](#multiselectmessage-choices-initial-max-hint-warn)
+* [autocompleteMultiselect](#multiselectmessage-choices-initial-max-hint-warn)
+* [autocomplete](#autocompletemessage-choices-initial-suggest-limit-style)
+* [date](#datemessage-initial-warn)
+
+***
+
+### text(message, [initial], [style])
+> Text prompt for free text input.
+
+Hit <kbd>tab</kbd> to autocomplete to `initial` value when provided.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/text.gif" alt="text prompt" width="499" height="103" />
+
+```js
+{
+ type: 'text',
+ name: 'value',
+ message: `What's your twitter handle?`
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `string` | Default string value |
+| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `default` |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### password(message, [initial])
+> Password prompt with masked input.
+
+This prompt is a similar to a prompt of type `'text'` with `style` set to `'password'`.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/password.gif" alt="password prompt" width="499" height="103" />
+
+```js
+{
+ type: 'password',
+ name: 'value',
+ message: 'Tell me a secret'
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `string` | Default string value |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### invisible(message, [initial])
+> Prompts user for invisible text input.
+
+This prompt is working like `sudo` where the input is invisible.
+This prompt is a similar to a prompt of type `'text'` with style set to `'invisible'`.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/invisible.gif" alt="invisible prompt" width="499" height="103" />
+
+```js
+{
+ type: 'invisible',
+ name: 'value',
+ message: 'Enter password'
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `string` | Default string value |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### number(message, initial, [max], [min], [style])
+> Prompts user for number input.
+
+You can type in numbers and use <kbd>up</kbd>/<kbd>down</kbd> to increase/decrease the value. Only numbers are allowed as input. Hit <kbd>tab</kbd> to autocomplete to `initial` value when provided.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/number.gif" alt="number prompt" width="499" height="103" />
+
+```js
+{
+ type: 'number',
+ name: 'value',
+ message: 'How old are you?',
+ initial: 0,
+ style: 'default',
+ min: 2,
+ max: 10
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `number` | Default number value |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown |
+| max | `number` | Max value. Defaults to `Infinity` |
+| min | `number` | Min value. Defaults to `-infinity` |
+| float | `boolean` | Allow floating point inputs. Defaults to `false` |
+| round | `number` | Round `float` values to x decimals. Defaults to `2` |
+| increment | `number` | Increment step when using <kbd>arrow</kbd> keys. Defaults to `1` |
+| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `default` |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### confirm(message, [initial])
+> Classic yes/no prompt.
+
+Hit <kbd>y</kbd> or <kbd>n</kbd> to confirm/reject.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/confirm.gif" alt="confirm prompt" width="499" height="103" />
+
+```js
+{
+ type: 'confirm',
+ name: 'value',
+ message: 'Can you confirm?',
+ initial: true
+}
+```
+
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `boolean` | Default value. Default is `false` |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### list(message, [initial])
+> List prompt that return an array.
+
+Similar to the `text` prompt, but the output is an `Array` containing the
+string separated by `separator`.
+
+```js
+{
+ type: 'list',
+ name: 'value',
+ message: 'Enter keywords',
+ initial: '',
+ separator: ','
+}
+```
+
+<img src="https://github.com/terkelg/prompts/raw/master/media/list.gif" alt="list prompt" width="499" height="103" />
+
+
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `boolean` | Default value |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| separator | `string` | String separator. Will trim all white-spaces from start and end of string. Defaults to `','` |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### toggle(message, [initial], [active], [inactive])
+> Interactive toggle/switch prompt.
+
+Use tab or <kbd>arrow keys</kbd>/<kbd>tab</kbd>/<kbd>space</kbd> to switch between options.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/toggle.gif" alt="toggle prompt" width="499" height="103" />
+
+```js
+{
+ type: 'toggle',
+ name: 'value',
+ message: 'Can you confirm?',
+ initial: true,
+ active: 'yes',
+ inactive: 'no'
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `boolean` | Default value. Defaults to `false` |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| active | `string` | Text for `active` state. Defaults to `'on'` |
+| inactive | `string` | Text for `inactive` state. Defaults to `'off'` |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### select(message, choices, [initial], [hint], [warn])
+> Interactive select prompt.
+
+Use <kbd>up</kbd>/<kbd>down</kbd> to navigate. Use <kbd>tab</kbd> to cycle the list.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/select.gif" alt="select prompt" width="499" height="130" />
+
+```js
+{
+ type: 'select',
+ name: 'value',
+ message: 'Pick a color',
+ choices: [
+ { title: 'Red', description: 'This option has a description', value: '#ff0000' },
+ { title: 'Green', value: '#00ff00', disabled: true },
+ { title: 'Blue', value: '#0000ff' }
+ ],
+ initial: 1
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `number` | Index of default value |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| hint | `string` | Hint to display to the user |
+| warn | `string` | Message to display when selecting a disabled option |
+| choices | `Array` | Array of strings or choices objects `[{ title, description, value, disabled }, ...]`. The choice's index in the array will be used as its value if it is not specified. |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### multiselect(message, choices, [initial], [max], [hint], [warn])
+### autocompleteMultiselect(same)
+> Interactive multi-select prompt.
+> Autocomplete is a searchable multiselect prompt with the same options. Useful for long lists.
+
+Use <kbd>space</kbd> to toggle select/unselect and <kbd>up</kbd>/<kbd>down</kbd> to navigate. Use <kbd>tab</kbd> to cycle the list. You can also use <kbd>right</kbd> to select and <kbd>left</kbd> to deselect.
+By default this prompt returns an `array` containing the **values** of the selected items - not their display title.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/multiselect.gif" alt="multiselect prompt" width="499" height="130" />
+
+```js
+{
+ type: 'multiselect',
+ name: 'value',
+ message: 'Pick colors',
+ choices: [
+ { title: 'Red', value: '#ff0000' },
+ { title: 'Green', value: '#00ff00', disabled: true },
+ { title: 'Blue', value: '#0000ff', selected: true }
+ ],
+ max: 2,
+ hint: '- Space to select. Return to submit'
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| instructions | `string` or `boolean` | Prompt instructions to display |
+| choices | `Array` | Array of strings or choices objects `[{ title, value, disabled }, ...]`. The choice's index in the array will be used as its value if it is not specified. |
+| optionsPerPage | `number` | Number of options displayed per page (default: 10) |
+| min | `number` | Min select - will display error |
+| max | `number` | Max select |
+| hint | `string` | Hint to display to the user |
+| warn | `string` | Message to display when selecting a disabled option |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+This is one of the few prompts that don't take a initial value.
+If you want to predefine selected values, give the choice object an `selected` property of `true`.
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### autocomplete(message, choices, [initial], [suggest], [limit], [style])
+> Interactive auto complete prompt.
+
+The prompt will list options based on user input. Type to filter the list.
+Use <kbd>⇧</kbd>/<kbd>⇩</kbd> to navigate. Use <kbd>tab</kbd> to cycle the result. Use <kbd>Page Up</kbd>/<kbd>Page Down</kbd> (on Mac: <kbd>fn</kbd> + <kbd>⇧</kbd> / <kbd>⇩</kbd>) to change page. Hit <kbd>enter</kbd> to select the highlighted item below the prompt.
+
+The default suggests function is sorting based on the `title` property of the choices.
+You can overwrite how choices are being filtered by passing your own suggest function.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/autocomplete.gif" alt="auto complete prompt" width="499" height="163" />
+
+```js
+{
+ type: 'autocomplete',
+ name: 'value',
+ message: 'Pick your favorite actor',
+ choices: [
+ { title: 'Cage' },
+ { title: 'Clooney', value: 'silver-fox' },
+ { title: 'Gyllenhaal' },
+ { title: 'Gibson' },
+ { title: 'Grant' }
+ ]
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| format | `function` | Receive user input. The returned value will be added to the response object |
+| choices | `Array` | Array of auto-complete choices objects `[{ title, value }, ...]` |
+| suggest | `function` | Filter function. Defaults to sort by `title` property. `suggest` should always return a promise. Filters using `title` by default |
+| limit | `number` | Max number of results to show. Defaults to `10` |
+| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `'default'` |
+| initial | `string \| number` | Default initial value |
+| clearFirst | `boolean` | The first ESCAPE keypress will clear the input |
+| fallback | `string` | Fallback message when no match is found. Defaults to `initial` value if provided |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with three properties: `value`, `aborted` and `exited` |
+
+Example on what a `suggest` function might look like:
+```js
+const suggestByTitle = (input, choices) =>
+ Promise.resolve(choices.filter(i => i.title.slice(0, input.length) === input))
+```
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+### date(message, [initial], [warn])
+> Interactive date prompt.
+
+Use <kbd>left</kbd>/<kbd>right</kbd>/<kbd>tab</kbd> to navigate. Use <kbd>up</kbd>/<kbd>down</kbd> to change date.
+
+#### Example
+<img src="https://github.com/terkelg/prompts/raw/master/media/date.gif" alt="date prompt" width="499" height="103" />
+
+```js
+{
+ type: 'date',
+ name: 'value',
+ message: 'Pick a date',
+ initial: new Date(1997, 09, 12),
+ validate: date => date > Date.now() ? 'Not in the future' : true
+}
+```
+
+#### Options
+| Param | Type | Description |
+| ----- | :--: | ----------- |
+| message | `string` | Prompt message to display |
+| initial | `date` | Default date |
+| locales | `object` | Use to define custom locales. See below for an example. |
+| mask | `string` | The format mask of the date. See below for more information.<br />Default: `YYYY-MM-DD HH:mm:ss` |
+| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown |
+| onRender | `function` | On render callback. Keyword `this` refers to the current prompt |
+| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` |
+
+Default locales:
+
+```javascript
+{
+ months: [
+ 'January', 'February', 'March', 'April',
+ 'May', 'June', 'July', 'August',
+ 'September', 'October', 'November', 'December'
+ ],
+ monthsShort: [
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
+ ],
+ weekdays: [
+ 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
+ 'Thursday', 'Friday', 'Saturday'
+ ],
+ weekdaysShort: [
+ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
+ ]
+}
+```
+>**Formatting**: See full list of formatting options in the [wiki](https://github.com/terkelg/prompts/wiki/Date-Time-Formatting)
+
+![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
+
+**↑ back to:** [Prompt types](#-types)
+
+***
+
+## ❯ Credit
+Many of the prompts are based on the work of [derhuerst](https://github.com/derhuerst).
+
+
+## ❯ License
+
+MIT © [Terkel Gjervig](https://terkel.com)
diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000..f478d58
--- /dev/null
+++ b/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/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000..16ffb93
--- /dev/null
+++ b/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/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000..2873b3b
--- /dev/null
+++ b/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/readable-stream/README.md b/node_modules/readable-stream/README.md
new file mode 100644
index 0000000..6f035ab
--- /dev/null
+++ b/node_modules/readable-stream/README.md
@@ -0,0 +1,106 @@
+# readable-stream
+
+***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/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/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+This package is a mirror of the streams implementations in Node.js.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/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.
+
+## Version 3.x.x
+
+v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
+
+1. Error codes: https://github.com/nodejs/node/pull/13310,
+ https://github.com/nodejs/node/pull/13291,
+ https://github.com/nodejs/node/pull/16589,
+ https://github.com/nodejs/node/pull/15042,
+ https://github.com/nodejs/node/pull/15665,
+ https://github.com/nodejs/readable-stream/pull/344
+2. 'readable' have precedence over flowing
+ https://github.com/nodejs/node/pull/18994
+3. make virtual methods errors consistent
+ https://github.com/nodejs/node/pull/18813
+4. updated streams error handling
+ https://github.com/nodejs/node/pull/18438
+5. writable.end should return this.
+ https://github.com/nodejs/node/pull/18780
+6. readable continues to read when push('')
+ https://github.com/nodejs/node/pull/18211
+7. add custom inspect to BufferList
+ https://github.com/nodejs/node/pull/17907
+8. always defer 'readable' with nextTick
+ https://github.com/nodejs/node/pull/17979
+
+## Version 2.x.x
+v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
+
+### Big Thanks
+
+Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
+
+# Usage
+
+You can swap your `require('stream')` with `require('readable-stream')`
+without any changes, if you are just using one of the main classes and
+functions.
+
+```js
+const {
+ Readable,
+ Writable,
+ Transform,
+ Duplex,
+ pipeline,
+ finished
+} = require('readable-stream')
+````
+
+Note that `require('stream')` will return `Stream`, while
+`require('readable-stream')` will return `Readable`. We discourage using
+whatever is exported directly, but rather use one of the properties as
+shown in the example above.
+
+# 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
+
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&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;
+* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) &lt;yoshuawuyts@gmail.com&gt;
+
+[sauce]: https://saucelabs.com
diff --git a/node_modules/readable-stream/errors-browser.js b/node_modules/readable-stream/errors-browser.js
new file mode 100644
index 0000000..fb8e73e
--- /dev/null
+++ b/node_modules/readable-stream/errors-browser.js
@@ -0,0 +1,127 @@
+'use strict';
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
+
+var codes = {};
+
+function createErrorType(code, message, Base) {
+ if (!Base) {
+ Base = Error;
+ }
+
+ function getMessage(arg1, arg2, arg3) {
+ if (typeof message === 'string') {
+ return message;
+ } else {
+ return message(arg1, arg2, arg3);
+ }
+ }
+
+ var NodeError =
+ /*#__PURE__*/
+ function (_Base) {
+ _inheritsLoose(NodeError, _Base);
+
+ function NodeError(arg1, arg2, arg3) {
+ return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
+ }
+
+ return NodeError;
+ }(Base);
+
+ NodeError.prototype.name = Base.name;
+ NodeError.prototype.code = code;
+ codes[code] = NodeError;
+} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+
+
+function oneOf(expected, thing) {
+ if (Array.isArray(expected)) {
+ var len = expected.length;
+ expected = expected.map(function (i) {
+ return String(i);
+ });
+
+ if (len > 2) {
+ return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
+ } else if (len === 2) {
+ return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
+ } else {
+ return "of ".concat(thing, " ").concat(expected[0]);
+ }
+ } else {
+ return "of ".concat(thing, " ").concat(String(expected));
+ }
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+
+
+function startsWith(str, search, pos) {
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+
+
+function endsWith(str, search, this_len) {
+ if (this_len === undefined || this_len > str.length) {
+ this_len = str.length;
+ }
+
+ return str.substring(this_len - search.length, this_len) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+
+
+function includes(str, search, start) {
+ if (typeof start !== 'number') {
+ start = 0;
+ }
+
+ if (start + search.length > str.length) {
+ return false;
+ } else {
+ return str.indexOf(search, start) !== -1;
+ }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+ return 'The value "' + value + '" is invalid for option "' + name + '"';
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+ // determiner: 'must be' or 'must not be'
+ var determiner;
+
+ if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+ determiner = 'must not be';
+ expected = expected.replace(/^not /, '');
+ } else {
+ determiner = 'must be';
+ }
+
+ var msg;
+
+ if (endsWith(name, ' argument')) {
+ // For cases like 'first argument'
+ msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+ } else {
+ var type = includes(name, '.') ? 'property' : 'argument';
+ msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+ }
+
+ msg += ". Received type ".concat(typeof actual);
+ return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+ return 'The ' + name + ' method is not implemented';
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+ return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+ return 'Unknown encoding: ' + arg;
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+module.exports.codes = codes;
diff --git a/node_modules/readable-stream/errors.js b/node_modules/readable-stream/errors.js
new file mode 100644
index 0000000..8471526
--- /dev/null
+++ b/node_modules/readable-stream/errors.js
@@ -0,0 +1,116 @@
+'use strict';
+
+const codes = {};
+
+function createErrorType(code, message, Base) {
+ if (!Base) {
+ Base = Error
+ }
+
+ function getMessage (arg1, arg2, arg3) {
+ if (typeof message === 'string') {
+ return message
+ } else {
+ return message(arg1, arg2, arg3)
+ }
+ }
+
+ class NodeError extends Base {
+ constructor (arg1, arg2, arg3) {
+ super(getMessage(arg1, arg2, arg3));
+ }
+ }
+
+ NodeError.prototype.name = Base.name;
+ NodeError.prototype.code = code;
+
+ codes[code] = NodeError;
+}
+
+// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+function oneOf(expected, thing) {
+ if (Array.isArray(expected)) {
+ const len = expected.length;
+ expected = expected.map((i) => String(i));
+ if (len > 2) {
+ return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` +
+ expected[len - 1];
+ } else if (len === 2) {
+ return `one of ${thing} ${expected[0]} or ${expected[1]}`;
+ } else {
+ return `of ${thing} ${expected[0]}`;
+ }
+ } else {
+ return `of ${thing} ${String(expected)}`;
+ }
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+function startsWith(str, search, pos) {
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+function endsWith(str, search, this_len) {
+ if (this_len === undefined || this_len > str.length) {
+ this_len = str.length;
+ }
+ return str.substring(this_len - search.length, this_len) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+function includes(str, search, start) {
+ if (typeof start !== 'number') {
+ start = 0;
+ }
+
+ if (start + search.length > str.length) {
+ return false;
+ } else {
+ return str.indexOf(search, start) !== -1;
+ }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+ return 'The value "' + value + '" is invalid for option "' + name + '"'
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+ // determiner: 'must be' or 'must not be'
+ let determiner;
+ if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+ determiner = 'must not be';
+ expected = expected.replace(/^not /, '');
+ } else {
+ determiner = 'must be';
+ }
+
+ let msg;
+ if (endsWith(name, ' argument')) {
+ // For cases like 'first argument'
+ msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`;
+ } else {
+ const type = includes(name, '.') ? 'property' : 'argument';
+ msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`;
+ }
+
+ msg += `. Received type ${typeof actual}`;
+ return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+ return 'The ' + name + ' method is not implemented'
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+ return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+ return 'Unknown encoding: ' + arg
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+
+module.exports.codes = codes;
diff --git a/node_modules/readable-stream/experimentalWarning.js b/node_modules/readable-stream/experimentalWarning.js
new file mode 100644
index 0000000..78e8414
--- /dev/null
+++ b/node_modules/readable-stream/experimentalWarning.js
@@ -0,0 +1,17 @@
+'use strict'
+
+var experimentalWarnings = new Set();
+
+function emitExperimentalWarning(feature) {
+ if (experimentalWarnings.has(feature)) return;
+ var msg = feature + ' is an experimental feature. This feature could ' +
+ 'change at any time';
+ experimentalWarnings.add(feature);
+ process.emitWarning(msg, 'ExperimentalWarning');
+}
+
+function noop() {}
+
+module.exports.emitExperimentalWarning = process.emitWarning
+ ? emitExperimentalWarning
+ : noop;
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..6752519
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,139 @@
+// 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 objectKeys = Object.keys || function (obj) {
+ var keys = [];
+
+ for (var key in obj) {
+ keys.push(key);
+ }
+
+ return keys;
+};
+/*</replacement>*/
+
+
+module.exports = Duplex;
+
+var Readable = require('./_stream_readable');
+
+var Writable = require('./_stream_writable');
+
+require('inherits')(Duplex, Readable);
+
+{
+ // Allow the keys array to be GC'ed.
+ 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);
+ this.allowHalfOpen = true;
+
+ if (options) {
+ if (options.readable === false) this.readable = false;
+ if (options.writable === false) this.writable = false;
+
+ if (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 get() {
+ return this._writableState.highWaterMark;
+ }
+});
+Object.defineProperty(Duplex.prototype, 'writableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState && this._writableState.getBuffer();
+ }
+});
+Object.defineProperty(Duplex.prototype, 'writableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.length;
+ }
+}); // the no-half-open enforcer
+
+function onend() {
+ // If the writable side ended, then we're ok.
+ if (this._writableState.ended) return; // no more data can be written.
+ // But allow more writes to happen in this tick.
+
+ process.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function set(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;
+ }
+}); \ No newline at end of file
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..32e7414
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,39 @@
+// 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');
+
+require('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/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000..192d451
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1124 @@
+// 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';
+
+module.exports = Readable;
+/*<replacement>*/
+
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+/*<replacement>*/
+
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function EElistenerCount(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+
+
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+
+var Buffer = require('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 debugUtil = require('util');
+
+var debug;
+
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function debug() {};
+}
+/*</replacement>*/
+
+
+var BufferList = require('./internal/streams/buffer_list');
+
+var destroyImpl = require('./internal/streams/destroy');
+
+var _require = require('./internal/streams/state'),
+ getHighWaterMark = _require.getHighWaterMark;
+
+var _require$codes = require('../errors').codes,
+ ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+ ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.
+
+
+var StringDecoder;
+var createReadableStreamAsyncIterator;
+var from;
+
+require('inherits')(Readable, Stream);
+
+var errorOrDestroy = destroyImpl.errorOrDestroy;
+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 (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream, isDuplex) {
+ 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.
+
+ if (typeof isDuplex !== 'boolean') 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"
+
+ this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // 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;
+ this.paused = true; // Should close be emitted on destroy. Defaults to true.
+
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')
+
+ this.autoDestroy = !!options.autoDestroy; // 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); // Checking for a Stream.Duplex instance is faster here instead of inside
+ // the ReadableState constructor, at least with V8 6.5
+
+ var isDuplex = this instanceof Duplex;
+ this._readableState = new ReadableState(options, this, isDuplex); // 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', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ if (this._readableState === undefined) {
+ return false;
+ }
+
+ return this._readableState.destroyed;
+ },
+ set: function set(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) {
+ 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) {
+ debug('readableAddChunk', chunk);
+ var state = stream._readableState;
+
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+
+ if (er) {
+ errorOrDestroy(stream, 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) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
+ } else if (state.destroyed) {
+ return false;
+ } 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;
+ maybeReadMore(stream, state);
+ }
+ } // We can push more data if we are below the highWaterMark.
+ // 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.
+
+
+ return !state.ended && (state.length < state.highWaterMark || state.length === 0);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ state.awaitDrain = 0;
+ stream.emit('data', chunk);
+ } 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 ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);
+ }
+
+ return er;
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+}; // backwards compatibility.
+
+
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ var decoder = new StringDecoder(enc);
+ this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8
+
+ this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:
+
+ var p = this._readableState.buffer.head;
+ var content = '';
+
+ while (p !== null) {
+ content += decoder.write(p.data);
+ p = p.next;
+ }
+
+ this._readableState.buffer.clear();
+
+ if (content !== '') this._readableState.buffer.push(content);
+ this._readableState.length = content.length;
+ return this;
+}; // Don't raise the hwm > 1GB
+
+
+var MAX_HWM = 0x40000000;
+
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.
+ 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.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || 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 = state.length <= state.highWaterMark;
+ n = 0;
+ } else {
+ state.length -= n;
+ state.awaitDrain = 0;
+ }
+
+ 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) {
+ debug('onEofChunk');
+ 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;
+
+ if (state.sync) {
+ // if we are sync, wait until next tick to emit the data.
+ // Otherwise we risk emitting data in the flow()
+ // the readable code triggers during a read() call
+ emitReadable(stream);
+ } else {
+ // emit 'readable' now to make sure it gets picked up.
+ state.needReadable = false;
+
+ if (!state.emittedReadable) {
+ state.emittedReadable = true;
+ 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;
+ debug('emitReadable', state.needReadable, state.emittedReadable);
+ state.needReadable = false;
+
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ process.nextTick(emitReadable_, stream);
+ }
+}
+
+function emitReadable_(stream) {
+ var state = stream._readableState;
+ debug('emitReadable_', state.destroyed, state.length, state.ended);
+
+ if (!state.destroyed && (state.length || state.ended)) {
+ stream.emit('readable');
+ state.emittedReadable = false;
+ } // The stream needs another readable event if
+ // 1. It is not flowing, as the flow mechanism will take
+ // care of it.
+ // 2. It is not ended.
+ // 3. It is below the highWaterMark, so we can schedule
+ // another readable later.
+
+
+ state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
+ 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(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ // Attempt to read more data if we should.
+ //
+ // The conditions for reading more data are (one of):
+ // - Not enough data buffered (state.length < state.highWaterMark). The loop
+ // is responsible for filling the buffer with enough data if such data
+ // is available. If highWaterMark is 0 and we are not in the flowing mode
+ // we should _not_ attempt to buffer any extra data. We'll get more data
+ // when the stream consumer calls read() instead.
+ // - No data in the buffer, and the stream is in flowing mode. In this mode
+ // the loop below is responsible for ensuring read() is called. Failing to
+ // call read here would abort the flow and there's no other mechanism for
+ // continuing the flow if the stream consumer has just subscribed to the
+ // 'data' event.
+ //
+ // In addition to the above conditions to keep reading data, the following
+ // conditions prevent the data from being read:
+ // - The stream has ended (state.ended).
+ // - There is already a pending 'read' operation (state.reading). This is a
+ // case where the the stream has called the implementation defined _read()
+ // method, but they are processing the call asynchronously and have _not_
+ // called push() with new data. In this case we skip performing more
+ // read()s. The execution ends in this method again after the _read() ends
+ // up calling push() with more data.
+ while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
+ var len = state.length;
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length) // didn't get any data, stop spinning.
+ break;
+ }
+
+ 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) {
+ errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
+};
+
+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) process.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();
+ }
+
+ src.on('data', ondata);
+
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ debug('dest.write', ret);
+
+ if (ret === false) {
+ // 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', state.awaitDrain);
+ state.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 (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, 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 pipeOnDrainFunctionResult() {
+ 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, {
+ hasUnpiped: false
+ });
+ }
+
+ 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);
+ var state = this._readableState;
+
+ if (ev === 'data') {
+ // update readableListening so that resume() may be a no-op
+ // a few lines down. This is needed to support once('readable').
+ state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused
+
+ if (state.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.flowing = false;
+ state.emittedReadable = false;
+ debug('on readable', state.length, state.reading);
+
+ if (state.length) {
+ emitReadable(this);
+ } else if (!state.reading) {
+ process.nextTick(nReadingNextTick, this);
+ }
+ }
+ }
+
+ return res;
+};
+
+Readable.prototype.addListener = Readable.prototype.on;
+
+Readable.prototype.removeListener = function (ev, fn) {
+ var res = Stream.prototype.removeListener.call(this, ev, fn);
+
+ if (ev === 'readable') {
+ // We need to check if there is someone still listening to
+ // readable and reset the state. However this needs to happen
+ // after readable has been emitted but before I/O (nextTick) to
+ // support once('readable', fn) cycles. This means that calling
+ // resume within the same tick will have no
+ // effect.
+ process.nextTick(updateReadableListening, this);
+ }
+
+ return res;
+};
+
+Readable.prototype.removeAllListeners = function (ev) {
+ var res = Stream.prototype.removeAllListeners.apply(this, arguments);
+
+ if (ev === 'readable' || ev === undefined) {
+ // We need to check if there is someone still listening to
+ // readable and reset the state. However this needs to happen
+ // after readable has been emitted but before I/O (nextTick) to
+ // support once('readable', fn) cycles. This means that calling
+ // resume within the same tick will have no
+ // effect.
+ process.nextTick(updateReadableListening, this);
+ }
+
+ return res;
+};
+
+function updateReadableListening(self) {
+ var state = self._readableState;
+ state.readableListening = self.listenerCount('readable') > 0;
+
+ if (state.resumeScheduled && !state.paused) {
+ // flowing needs to be set to true now, otherwise
+ // the upcoming resume will not flow.
+ state.flowing = true; // crude way to check if we should resume
+ } else if (self.listenerCount('data') > 0) {
+ self.resume();
+ }
+}
+
+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'); // we flow only if there is no one listening
+ // for readable, but we still have to call
+ // resume()
+
+ state.flowing = !state.readableListening;
+ resume(this, state);
+ }
+
+ state.paused = false;
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ debug('resume', state.reading);
+
+ if (!state.reading) {
+ stream.read(0);
+ }
+
+ 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 (this._readableState.flowing !== false) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+
+ this._readableState.paused = true;
+ 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 methodWrap(method) {
+ return function methodWrapReturnFunction() {
+ 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;
+};
+
+if (typeof Symbol === 'function') {
+ Readable.prototype[Symbol.asyncIterator] = function () {
+ if (createReadableStreamAsyncIterator === undefined) {
+ createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');
+ }
+
+ return createReadableStreamAsyncIterator(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 get() {
+ return this._readableState.highWaterMark;
+ }
+});
+Object.defineProperty(Readable.prototype, 'readableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState && this._readableState.buffer;
+ }
+});
+Object.defineProperty(Readable.prototype, 'readableFlowing', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.flowing;
+ },
+ set: function set(state) {
+ if (this._readableState) {
+ this._readableState.flowing = state;
+ }
+ }
+}); // exposed for testing purposes only.
+
+Readable._fromList = fromList;
+Object.defineProperty(Readable.prototype, 'readableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.length;
+ }
+}); // 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.first();else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = state.buffer.consume(n, state.decoder);
+ }
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+ debug('endReadable', state.endEmitted);
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ process.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.
+
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+
+ if (state.autoDestroy) {
+ // In case of duplex streams we need a way to detect
+ // if the writable side is ready for autoDestroy as well
+ var wState = stream._writableState;
+
+ if (!wState || wState.autoDestroy && wState.finished) {
+ stream.destroy();
+ }
+ }
+ }
+}
+
+if (typeof Symbol === 'function') {
+ Readable.from = function (iterable, opts) {
+ if (from === undefined) {
+ from = require('./internal/streams/from');
+ }
+
+ return from(Readable, iterable, opts);
+ };
+}
+
+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/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000..41a738c
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,201 @@
+// 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 _require$codes = require('../errors').codes,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+ ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
+ ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
+
+var Duplex = require('./_stream_duplex');
+
+require('inherits')(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+ var cb = ts.writecb;
+
+ if (cb === null) {
+ return this.emit('error', new ERR_MULTIPLE_CALLBACK());
+ }
+
+ 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._readableState.destroyed) {
+ 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) {
+ cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
+};
+
+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.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) {
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ });
+};
+
+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); // TODO(BridgeAR): Write a test for these two error cases
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+
+ if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
+ if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
+ return stream.push(null);
+} \ No newline at end of file
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..a2634d7
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,697 @@
+// 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';
+
+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 Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+/*<replacement>*/
+
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+
+var Buffer = require('buffer').Buffer;
+
+var OurUint8Array = global.Uint8Array || function () {};
+
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+var destroyImpl = require('./internal/streams/destroy');
+
+var _require = require('./internal/streams/state'),
+ getHighWaterMark = _require.getHighWaterMark;
+
+var _require$codes = require('../errors').codes,
+ ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+ ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,
+ ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,
+ ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,
+ ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
+ ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
+
+var errorOrDestroy = destroyImpl.errorOrDestroy;
+
+require('inherits')(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream, isDuplex) {
+ 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,
+ // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.
+
+ if (typeof isDuplex !== 'boolean') 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()
+
+ this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // 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; // Should close be emitted on destroy. Defaults to true.
+
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')
+
+ this.autoDestroy = !!options.autoDestroy; // 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 writableStateBufferGetter() {
+ 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 value(object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function realHasInstance(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.
+ // Checking for a Stream.Duplex instance is faster here instead of inside
+ // the WritableState constructor, at least with V8 6.5
+
+ var isDuplex = this instanceof Duplex;
+ if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
+ this._writableState = new WritableState(options, this, isDuplex); // 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 () {
+ errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
+
+ errorOrDestroy(stream, er);
+ process.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 er;
+
+ if (chunk === null) {
+ er = new ERR_STREAM_NULL_VALUES();
+ } else if (typeof chunk !== 'string' && !state.objectMode) {
+ er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);
+ }
+
+ if (er) {
+ errorOrDestroy(stream, er);
+ process.nextTick(cb, er);
+ return false;
+ }
+
+ return true;
+}
+
+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.ending) 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 () {
+ this._writableState.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+ if (!state.writing && !state.corked && !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 ERR_UNKNOWN_ENCODING(encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+Object.defineProperty(Writable.prototype, 'writableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState && this._writableState.getBuffer();
+ }
+});
+
+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 get() {
+ 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 (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else 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
+ process.nextTick(cb, er); // this can emit finish, and it will always happen
+ // after error
+
+ process.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ errorOrDestroy(stream, er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ errorOrDestroy(stream, 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;
+ if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();
+ 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) || stream.destroyed;
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ process.nextTick(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;
+ 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 ERR_METHOD_NOT_IMPLEMENTED('_write()'));
+};
+
+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) endWritable(this, state, cb);
+ return this;
+};
+
+Object.defineProperty(Writable.prototype, 'writableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.length;
+ }
+});
+
+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) {
+ errorOrDestroy(stream, 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.destroyed) {
+ state.pendingcb++;
+ state.finalCalled = true;
+ process.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');
+
+ if (state.autoDestroy) {
+ // In case of duplex streams we need a way to detect
+ // if the readable side is ready for autoDestroy as well
+ var rState = stream._readableState;
+
+ if (!rState || rState.autoDestroy && rState.endEmitted) {
+ stream.destroy();
+ }
+ }
+ }
+ }
+
+ 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;
+ 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;
+ } // reuse the free corkReq.
+
+
+ state.corkedRequestsFree.next = corkReq;
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ if (this._writableState === undefined) {
+ return false;
+ }
+
+ return this._writableState.destroyed;
+ },
+ set: function set(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) {
+ cb(err);
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/node_modules/readable-stream/lib/internal/streams/async_iterator.js
new file mode 100644
index 0000000..9fb615a
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/async_iterator.js
@@ -0,0 +1,207 @@
+'use strict';
+
+var _Object$setPrototypeO;
+
+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; }
+
+var finished = require('./end-of-stream');
+
+var kLastResolve = Symbol('lastResolve');
+var kLastReject = Symbol('lastReject');
+var kError = Symbol('error');
+var kEnded = Symbol('ended');
+var kLastPromise = Symbol('lastPromise');
+var kHandlePromise = Symbol('handlePromise');
+var kStream = Symbol('stream');
+
+function createIterResult(value, done) {
+ return {
+ value: value,
+ done: done
+ };
+}
+
+function readAndResolve(iter) {
+ var resolve = iter[kLastResolve];
+
+ if (resolve !== null) {
+ var data = iter[kStream].read(); // we defer if data is null
+ // we can be expecting either 'end' or
+ // 'error'
+
+ if (data !== null) {
+ iter[kLastPromise] = null;
+ iter[kLastResolve] = null;
+ iter[kLastReject] = null;
+ resolve(createIterResult(data, false));
+ }
+ }
+}
+
+function onReadable(iter) {
+ // we wait for the next tick, because it might
+ // emit an error with process.nextTick
+ process.nextTick(readAndResolve, iter);
+}
+
+function wrapForNext(lastPromise, iter) {
+ return function (resolve, reject) {
+ lastPromise.then(function () {
+ if (iter[kEnded]) {
+ resolve(createIterResult(undefined, true));
+ return;
+ }
+
+ iter[kHandlePromise](resolve, reject);
+ }, reject);
+ };
+}
+
+var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
+var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
+ get stream() {
+ return this[kStream];
+ },
+
+ next: function next() {
+ var _this = this;
+
+ // if we have detected an error in the meanwhile
+ // reject straight away
+ var error = this[kError];
+
+ if (error !== null) {
+ return Promise.reject(error);
+ }
+
+ if (this[kEnded]) {
+ return Promise.resolve(createIterResult(undefined, true));
+ }
+
+ if (this[kStream].destroyed) {
+ // We need to defer via nextTick because if .destroy(err) is
+ // called, the error will be emitted via nextTick, and
+ // we cannot guarantee that there is no error lingering around
+ // waiting to be emitted.
+ return new Promise(function (resolve, reject) {
+ process.nextTick(function () {
+ if (_this[kError]) {
+ reject(_this[kError]);
+ } else {
+ resolve(createIterResult(undefined, true));
+ }
+ });
+ });
+ } // if we have multiple next() calls
+ // we will wait for the previous Promise to finish
+ // this logic is optimized to support for await loops,
+ // where next() is only called once at a time
+
+
+ var lastPromise = this[kLastPromise];
+ var promise;
+
+ if (lastPromise) {
+ promise = new Promise(wrapForNext(lastPromise, this));
+ } else {
+ // fast path needed to support multiple this.push()
+ // without triggering the next() queue
+ var data = this[kStream].read();
+
+ if (data !== null) {
+ return Promise.resolve(createIterResult(data, false));
+ }
+
+ promise = new Promise(this[kHandlePromise]);
+ }
+
+ this[kLastPromise] = promise;
+ return promise;
+ }
+}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
+ return this;
+}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
+ var _this2 = this;
+
+ // destroy(err, cb) is a private API
+ // we can guarantee we have that here, because we control the
+ // Readable class this is attached to
+ return new Promise(function (resolve, reject) {
+ _this2[kStream].destroy(null, function (err) {
+ if (err) {
+ reject(err);
+ return;
+ }
+
+ resolve(createIterResult(undefined, true));
+ });
+ });
+}), _Object$setPrototypeO), AsyncIteratorPrototype);
+
+var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
+ var _Object$create;
+
+ var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
+ value: stream,
+ writable: true
+ }), _defineProperty(_Object$create, kLastResolve, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kLastReject, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kError, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kEnded, {
+ value: stream._readableState.endEmitted,
+ writable: true
+ }), _defineProperty(_Object$create, kHandlePromise, {
+ value: function value(resolve, reject) {
+ var data = iterator[kStream].read();
+
+ if (data) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ resolve(createIterResult(data, false));
+ } else {
+ iterator[kLastResolve] = resolve;
+ iterator[kLastReject] = reject;
+ }
+ },
+ writable: true
+ }), _Object$create));
+ iterator[kLastPromise] = null;
+ finished(stream, function (err) {
+ if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
+ var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
+ // returned by next() and store the error
+
+ if (reject !== null) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ reject(err);
+ }
+
+ iterator[kError] = err;
+ return;
+ }
+
+ var resolve = iterator[kLastResolve];
+
+ if (resolve !== null) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ resolve(createIterResult(undefined, true));
+ }
+
+ iterator[kEnded] = true;
+ });
+ stream.on('readable', onReadable.bind(null, iterator));
+ return iterator;
+};
+
+module.exports = createReadableStreamAsyncIterator; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/readable-stream/lib/internal/streams/buffer_list.js
new file mode 100644
index 0000000..cdea425
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/buffer_list.js
@@ -0,0 +1,210 @@
+'use strict';
+
+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; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+var _require = require('buffer'),
+ Buffer = _require.Buffer;
+
+var _require2 = require('util'),
+ inspect = _require2.inspect;
+
+var custom = inspect && inspect.custom || 'inspect';
+
+function copyBuffer(src, target, offset) {
+ Buffer.prototype.copy.call(src, target, offset);
+}
+
+module.exports =
+/*#__PURE__*/
+function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ _createClass(BufferList, [{
+ key: "push",
+ value: 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;
+ }
+ }, {
+ key: "unshift",
+ value: function unshift(v) {
+ var entry = {
+ data: v,
+ next: this.head
+ };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ }
+ }, {
+ key: "shift",
+ value: 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;
+ }
+ }, {
+ key: "clear",
+ value: function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ }
+ }, {
+ key: "join",
+ value: 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;
+ }
+ }, {
+ key: "concat",
+ value: function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ 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;
+ } // Consumes a specified amount of bytes or characters from the buffered data.
+
+ }, {
+ key: "consume",
+ value: function consume(n, hasStrings) {
+ var ret;
+
+ if (n < this.head.data.length) {
+ // `slice` is the same for buffers and strings.
+ ret = this.head.data.slice(0, n);
+ this.head.data = this.head.data.slice(n);
+ } else if (n === this.head.data.length) {
+ // First chunk is a perfect match.
+ ret = this.shift();
+ } else {
+ // Result spans more than one buffer.
+ ret = hasStrings ? this._getString(n) : this._getBuffer(n);
+ }
+
+ return ret;
+ }
+ }, {
+ key: "first",
+ value: function first() {
+ return this.head.data;
+ } // Consumes a specified amount of characters from the buffered data.
+
+ }, {
+ key: "_getString",
+ value: function _getString(n) {
+ var p = this.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) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = str.slice(nb);
+ }
+
+ break;
+ }
+
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Consumes a specified amount of bytes from the buffered data.
+
+ }, {
+ key: "_getBuffer",
+ value: function _getBuffer(n) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = this.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) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = buf.slice(nb);
+ }
+
+ break;
+ }
+
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Make sure the linked list only shows the minimal necessary information.
+
+ }, {
+ key: custom,
+ value: function value(_, options) {
+ return inspect(this, _objectSpread({}, options, {
+ // Only inspect one level.
+ depth: 0,
+ // It should not recurse.
+ customInspect: false
+ }));
+ }
+ }]);
+
+ return BufferList;
+}(); \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000..3268a16
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,105 @@
+'use strict'; // 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) {
+ if (!this._writableState) {
+ process.nextTick(emitErrorNT, this, err);
+ } else if (!this._writableState.errorEmitted) {
+ this._writableState.errorEmitted = true;
+ process.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) {
+ if (!_this._writableState) {
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+ } else if (!_this._writableState.errorEmitted) {
+ _this._writableState.errorEmitted = true;
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+ } else {
+ process.nextTick(emitCloseNT, _this);
+ }
+ } else if (cb) {
+ process.nextTick(emitCloseNT, _this);
+ cb(err);
+ } else {
+ process.nextTick(emitCloseNT, _this);
+ }
+ });
+
+ return this;
+}
+
+function emitErrorAndCloseNT(self, err) {
+ emitErrorNT(self, err);
+ emitCloseNT(self);
+}
+
+function emitCloseNT(self) {
+ if (self._writableState && !self._writableState.emitClose) return;
+ if (self._readableState && !self._readableState.emitClose) return;
+ self.emit('close');
+}
+
+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.finalCalled = false;
+ this._writableState.prefinished = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+function errorOrDestroy(stream, err) {
+ // We have tests that rely on errors being emitted
+ // in the same tick, so changing this is semver major.
+ // For now when you opt-in to autoDestroy we allow
+ // the error to be emitted nextTick. In a future
+ // semver major update we should change the default to this.
+ var rState = stream._readableState;
+ var wState = stream._writableState;
+ if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy,
+ errorOrDestroy: errorOrDestroy
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
new file mode 100644
index 0000000..831f286
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
@@ -0,0 +1,104 @@
+// Ported from https://github.com/mafintosh/end-of-stream with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;
+
+function once(callback) {
+ var called = false;
+ return function () {
+ if (called) return;
+ called = true;
+
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ callback.apply(this, args);
+ };
+}
+
+function noop() {}
+
+function isRequest(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function eos(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+ callback = once(callback || noop);
+ var readable = opts.readable || opts.readable !== false && stream.readable;
+ var writable = opts.writable || opts.writable !== false && stream.writable;
+
+ var onlegacyfinish = function onlegacyfinish() {
+ if (!stream.writable) onfinish();
+ };
+
+ var writableEnded = stream._writableState && stream._writableState.finished;
+
+ var onfinish = function onfinish() {
+ writable = false;
+ writableEnded = true;
+ if (!readable) callback.call(stream);
+ };
+
+ var readableEnded = stream._readableState && stream._readableState.endEmitted;
+
+ var onend = function onend() {
+ readable = false;
+ readableEnded = true;
+ if (!writable) callback.call(stream);
+ };
+
+ var onerror = function onerror(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function onclose() {
+ var err;
+
+ if (readable && !readableEnded) {
+ if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
+ return callback.call(stream, err);
+ }
+
+ if (writable && !writableEnded) {
+ if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
+ return callback.call(stream, err);
+ }
+ };
+
+ var onrequest = function onrequest() {
+ 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 && !stream._writableState) {
+ // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+ return function () {
+ 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('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+}
+
+module.exports = eos; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/from-browser.js b/node_modules/readable-stream/lib/internal/streams/from-browser.js
new file mode 100644
index 0000000..a4ce56f
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/from-browser.js
@@ -0,0 +1,3 @@
+module.exports = function () {
+ throw new Error('Readable.from is not available in the browser')
+};
diff --git a/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/readable-stream/lib/internal/streams/from.js
new file mode 100644
index 0000000..6c41284
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/from.js
@@ -0,0 +1,64 @@
+'use strict';
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+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; }
+
+var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE;
+
+function from(Readable, iterable, opts) {
+ var iterator;
+
+ if (iterable && typeof iterable.next === 'function') {
+ iterator = iterable;
+ } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable);
+
+ var readable = new Readable(_objectSpread({
+ objectMode: true
+ }, opts)); // Reading boolean to protect against _read
+ // being called before last iteration completion.
+
+ var reading = false;
+
+ readable._read = function () {
+ if (!reading) {
+ reading = true;
+ next();
+ }
+ };
+
+ function next() {
+ return _next2.apply(this, arguments);
+ }
+
+ function _next2() {
+ _next2 = _asyncToGenerator(function* () {
+ try {
+ var _ref = yield iterator.next(),
+ value = _ref.value,
+ done = _ref.done;
+
+ if (done) {
+ readable.push(null);
+ } else if (readable.push((yield value))) {
+ next();
+ } else {
+ reading = false;
+ }
+ } catch (err) {
+ readable.destroy(err);
+ }
+ });
+ return _next2.apply(this, arguments);
+ }
+
+ return readable;
+}
+
+module.exports = from; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/readable-stream/lib/internal/streams/pipeline.js
new file mode 100644
index 0000000..6589909
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/pipeline.js
@@ -0,0 +1,97 @@
+// Ported from https://github.com/mafintosh/pump with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var eos;
+
+function once(callback) {
+ var called = false;
+ return function () {
+ if (called) return;
+ called = true;
+ callback.apply(void 0, arguments);
+ };
+}
+
+var _require$codes = require('../../../errors').codes,
+ ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,
+ ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
+
+function noop(err) {
+ // Rethrow the error if it exists to avoid swallowing it
+ if (err) throw err;
+}
+
+function isRequest(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function destroyer(stream, reading, writing, callback) {
+ callback = once(callback);
+ var closed = false;
+ stream.on('close', function () {
+ closed = true;
+ });
+ if (eos === undefined) eos = require('./end-of-stream');
+ 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; // request.destroy just do .end - .abort is what we want
+
+ if (isRequest(stream)) return stream.abort();
+ if (typeof stream.destroy === 'function') return stream.destroy();
+ callback(err || new ERR_STREAM_DESTROYED('pipe'));
+ };
+}
+
+function call(fn) {
+ fn();
+}
+
+function pipe(from, to) {
+ return from.pipe(to);
+}
+
+function popCallback(streams) {
+ if (!streams.length) return noop;
+ if (typeof streams[streams.length - 1] !== 'function') return noop;
+ return streams.pop();
+}
+
+function pipeline() {
+ for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
+ streams[_key] = arguments[_key];
+ }
+
+ var callback = popCallback(streams);
+ if (Array.isArray(streams[0])) streams = streams[0];
+
+ if (streams.length < 2) {
+ throw new ERR_MISSING_ARGS('streams');
+ }
+
+ 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 = pipeline; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/readable-stream/lib/internal/streams/state.js
new file mode 100644
index 0000000..19887eb
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/state.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
+
+function highWaterMarkFrom(options, isDuplex, duplexKey) {
+ return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
+}
+
+function getHighWaterMark(state, options, duplexKey, isDuplex) {
+ var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
+
+ if (hwm != null) {
+ if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
+ var name = isDuplex ? duplexKey : 'highWaterMark';
+ throw new ERR_INVALID_OPT_VALUE(name, hwm);
+ }
+
+ return Math.floor(hwm);
+ } // Default value
+
+
+ return state.objectMode ? 16 : 16 * 1024;
+}
+
+module.exports = {
+ getHighWaterMark: getHighWaterMark
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000..9332a3f
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000..ce2ad5b
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json
new file mode 100644
index 0000000..0b0c4bd
--- /dev/null
+++ b/node_modules/readable-stream/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "readable-stream",
+ "version": "3.6.0",
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "main": "readable.js",
+ "engines": {
+ "node": ">= 6"
+ },
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "devDependencies": {
+ "@babel/cli": "^7.2.0",
+ "@babel/core": "^7.2.0",
+ "@babel/polyfill": "^7.0.0",
+ "@babel/preset-env": "^7.2.0",
+ "airtap": "0.0.9",
+ "assert": "^1.4.0",
+ "bl": "^2.0.0",
+ "deep-strict-equal": "^0.2.0",
+ "events.once": "^2.0.2",
+ "glob": "^7.1.2",
+ "gunzip-maybe": "^1.4.1",
+ "hyperquest": "^2.1.3",
+ "lolex": "^2.6.0",
+ "nyc": "^11.0.0",
+ "pump": "^3.0.0",
+ "rimraf": "^2.6.2",
+ "tap": "^12.0.0",
+ "tape": "^4.9.0",
+ "tar-fs": "^1.16.2",
+ "util-promisify": "^2.1.0"
+ },
+ "scripts": {
+ "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js",
+ "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap",
+ "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
+ "test-browser-local": "airtap --open --local -- test/browser.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "update-browser-errors": "babel -o errors-browser.js errors.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream"
+ },
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "browser": {
+ "util": false,
+ "worker_threads": false,
+ "./errors": "./errors-browser.js",
+ "./readable.js": "./readable-browser.js",
+ "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000..adbf60d
--- /dev/null
+++ b/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,9 @@
+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');
+exports.finished = require('./lib/internal/streams/end-of-stream.js');
+exports.pipeline = require('./lib/internal/streams/pipeline.js');
diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000..9e0ca12
--- /dev/null
+++ b/node_modules/readable-stream/readable.js
@@ -0,0 +1,16 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream.Readable;
+ Object.assign(module.exports, Stream);
+ module.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');
+ exports.finished = require('./lib/internal/streams/end-of-stream.js');
+ exports.pipeline = require('./lib/internal/streams/pipeline.js');
+}
diff --git a/node_modules/restore-cursor/index.d.ts b/node_modules/restore-cursor/index.d.ts
new file mode 100644
index 0000000..417891a
--- /dev/null
+++ b/node_modules/restore-cursor/index.d.ts
@@ -0,0 +1,11 @@
+/**
+Gracefully restore the CLI cursor on exit.
+
+@example
+```
+import restoreCursor from 'restore-cursor';
+
+restoreCursor();
+```
+*/
+export default function restoreCursor(): void;
diff --git a/node_modules/restore-cursor/index.js b/node_modules/restore-cursor/index.js
new file mode 100644
index 0000000..0c117e9
--- /dev/null
+++ b/node_modules/restore-cursor/index.js
@@ -0,0 +1,11 @@
+import process from 'node:process';
+import onetime from 'onetime';
+import signalExit from 'signal-exit';
+
+const restoreCursor = onetime(() => {
+ signalExit(() => {
+ process.stderr.write('\u001B[?25h');
+ }, {alwaysLast: true});
+});
+
+export default restoreCursor;
diff --git a/node_modules/restore-cursor/license b/node_modules/restore-cursor/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/restore-cursor/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/restore-cursor/package.json b/node_modules/restore-cursor/package.json
new file mode 100644
index 0000000..031d45a
--- /dev/null
+++ b/node_modules/restore-cursor/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "restore-cursor",
+ "version": "4.0.0",
+ "description": "Gracefully restore the CLI cursor on exit",
+ "license": "MIT",
+ "repository": "sindresorhus/restore-cursor",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "scripts": {
+ "test": "xo && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "exit",
+ "quit",
+ "process",
+ "graceful",
+ "shutdown",
+ "sigterm",
+ "sigint",
+ "terminate",
+ "kill",
+ "stop",
+ "cli",
+ "cursor",
+ "ansi",
+ "show",
+ "term",
+ "terminal",
+ "console",
+ "tty",
+ "shell",
+ "command-line"
+ ],
+ "dependencies": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ },
+ "devDependencies": {
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/restore-cursor/readme.md b/node_modules/restore-cursor/readme.md
new file mode 100644
index 0000000..0ed544e
--- /dev/null
+++ b/node_modules/restore-cursor/readme.md
@@ -0,0 +1,31 @@
+# restore-cursor
+
+> Gracefully restore the CLI cursor on exit
+
+Prevent the cursor you've hidden interactively from remaining hidden if the process crashes.
+
+## Install
+
+```
+$ npm install restore-cursor
+```
+
+## Usage
+
+```js
+import restoreCursor from 'restore-cursor';
+
+restoreCursor();
+```
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-restore-cursor?utm_source=npm-restore-cursor&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/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/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..f9c7c00
--- /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 process 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..93703f3
--- /dev/null
+++ b/node_modules/signal-exit/index.js
@@ -0,0 +1,202 @@
+// 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.
+// grab a reference to node's real process object right away
+var process = global.process
+
+const processOk = function (process) {
+ return process &&
+ typeof process === 'object' &&
+ typeof process.removeListener === 'function' &&
+ typeof process.emit === 'function' &&
+ typeof process.reallyExit === 'function' &&
+ typeof process.listeners === 'function' &&
+ typeof process.kill === 'function' &&
+ typeof process.pid === 'number' &&
+ typeof process.on === 'function'
+}
+
+// some kind of non-node environment, just no-op
+/* istanbul ignore if */
+if (!processOk(process)) {
+ module.exports = function () {
+ return function () {}
+ }
+} else {
+ 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) {
+ /* istanbul ignore if */
+ if (!processOk(global.process)) {
+ return function () {}
+ }
+ 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
+ }
+
+ var unload = function unload () {
+ if (!loaded || !processOk(global.process)) {
+ return
+ }
+ loaded = false
+
+ signals.forEach(function (sig) {
+ try {
+ process.removeListener(sig, sigListeners[sig])
+ } catch (er) {}
+ })
+ process.emit = originalProcessEmit
+ process.reallyExit = originalProcessReallyExit
+ emitter.count -= 1
+ }
+ module.exports.unload = unload
+
+ var emit = function emit (event, code, signal) {
+ /* istanbul ignore if */
+ 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 () {
+ /* istanbul ignore if */
+ if (!processOk(global.process)) {
+ return
+ }
+ // 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'
+ }
+ /* istanbul ignore next */
+ process.kill(process.pid, sig)
+ }
+ }
+ })
+
+ module.exports.signals = function () {
+ return signals
+ }
+
+ var loaded = false
+
+ var load = function load () {
+ if (loaded || !processOk(global.process)) {
+ 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
+ }
+ module.exports.load = load
+
+ var originalProcessReallyExit = process.reallyExit
+ var processReallyExit = function processReallyExit (code) {
+ /* istanbul ignore if */
+ if (!processOk(global.process)) {
+ return
+ }
+ process.exitCode = code || /* istanbul ignore next */ 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
+ var processEmit = function processEmit (ev, arg) {
+ if (ev === 'exit' && processOk(global.process)) {
+ /* istanbul ignore else */
+ if (arg !== undefined) {
+ process.exitCode = arg
+ }
+ var ret = originalProcessEmit.apply(this, arguments)
+ /* istanbul ignore next */
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ /* istanbul ignore next */
+ 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..e1a0031
--- /dev/null
+++ b/node_modules/signal-exit/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "signal-exit",
+ "version": "3.0.7",
+ "description": "when you want to fire an event no matter how a process exits.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags"
+ },
+ "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": "^3.1.1",
+ "nyc": "^15.1.0",
+ "standard-version": "^9.3.1",
+ "tap": "^15.1.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/sisteransi/license b/node_modules/sisteransi/license
new file mode 100644
index 0000000..13dc83c
--- /dev/null
+++ b/node_modules/sisteransi/license
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Terkel Gjervig Nielsen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 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/sisteransi/package.json b/node_modules/sisteransi/package.json
new file mode 100755
index 0000000..55a6476
--- /dev/null
+++ b/node_modules/sisteransi/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "sisteransi",
+ "version": "1.0.5",
+ "description": "ANSI escape codes for some terminal swag",
+ "main": "src/index.js",
+ "license": "MIT",
+ "author": {
+ "name": "Terkel Gjervig",
+ "email": "terkel@terkel.com",
+ "url": "https://terkel.com"
+ },
+ "scripts": {
+ "test": "tape test/*.js | tap-spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/terkelg/sisteransi"
+ },
+ "files": [
+ "src"
+ ],
+ "types": "./src/sisteransi.d.ts",
+ "keywords": [
+ "ansi",
+ "escape codes",
+ "escape",
+ "terminal",
+ "style"
+ ],
+ "devDependencies": {
+ "tap-spec": "^5.0.0",
+ "tape": "^4.13.2"
+ }
+}
diff --git a/node_modules/sisteransi/readme.md b/node_modules/sisteransi/readme.md
new file mode 100755
index 0000000..632f0d7
--- /dev/null
+++ b/node_modules/sisteransi/readme.md
@@ -0,0 +1,113 @@
+# sister ANSI [![Version](https://img.shields.io/npm/v/sisteransi.svg)](https://www.npmjs.com/package/sisteransi) [![Build Status](https://travis-ci.org/terkelg/sisteransi.svg?branch=master)](https://travis-ci.org/terkelg/sisteransi) [![Downloads](https://img.shields.io/npm/dm/sisteransi.svg)](https://www.npmjs.com/package/sisteransi)
+
+> Ansi escape codes faster than you can say "[Bam bam](https://www.youtube.com/watch?v=OcaPu9JPenU)".
+
+## Installation
+
+```
+npm install sisteransi
+```
+
+
+## Usage
+
+```js
+const ansi = require('sisteransi');
+// or const { cursor } = require('sisteransi');
+
+const p = str => process.stdout.write(str);
+
+// move cursor to 2, 1
+p(ansi.cursor.to(2, 1));
+
+// to up, one down
+p(ansi.cursor.up(2)+ansi.cursor.down(1));
+```
+
+## API
+
+### cursor
+
+#### to(x, y)
+Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
+
+#### move(x, y)
+Set the position of the cursor relative to its current position.
+
+#### up(count = 1)
+Move cursor up a specific amount of rows. Default is `1`.
+
+#### down(count = 1)
+Move cursor down a specific amount of rows. Default is `1`.
+
+#### forward(count = 1)
+Move cursor forward a specific amount of rows. Default is `1`.
+
+#### backward(count = 1)
+Move cursor backward a specific amount of rows. Default is `1`.
+
+#### nextLine(count = 1)
+Move cursor to the next line a specific amount of lines. Default is `1`.
+
+#### prevLine(count = 1)
+Move cursor to the previous a specific amount of lines. Default is `1`.
+
+#### left
+Move cursor to the left side.
+
+#### hide
+Hide cursor.
+
+#### show
+Show cursor.
+
+#### save
+
+Save cursor position.
+
+#### restore
+
+Restore cursor position.
+
+
+### scroll
+
+#### up(count = 1)
+Scroll display up a specific amount of lines. Default to `1`.
+
+#### down(count = 1)
+Scroll display down a specific amount of lines. Default to `1`.
+
+
+### erase
+
+#### screen
+Erase the screen and move the cursor the top left position.
+
+#### up(count = 1)
+Erase the screen from the current line up to the top of the screen. Default to `1`.
+
+#### down(count = 2)
+Erase the screen from the current line down to the bottom of the screen. Default to `1`.
+
+#### line
+Erase the entire current line.
+
+#### lineEnd
+Erase from the current cursor position to the end of the current line.
+
+#### lineStart
+Erase from the current cursor position to the start of the current line.
+
+#### lines(count)
+Erase from the current cursor position up the specified amount of rows.
+
+
+## Credit
+
+This is a fork of [ansi-escapes](https://github.com/sindresorhus/ansi-escapes).
+
+
+## License
+
+MIT © [Terkel Gjervig](https://terkel.com)
diff --git a/node_modules/sisteransi/src/index.js b/node_modules/sisteransi/src/index.js
new file mode 100644
index 0000000..7034e2e
--- /dev/null
+++ b/node_modules/sisteransi/src/index.js
@@ -0,0 +1,58 @@
+'use strict';
+
+const ESC = '\x1B';
+const CSI = `${ESC}[`;
+const beep = '\u0007';
+
+const cursor = {
+ to(x, y) {
+ if (!y) return `${CSI}${x + 1}G`;
+ return `${CSI}${y + 1};${x + 1}H`;
+ },
+ move(x, y) {
+ let ret = '';
+
+ if (x < 0) ret += `${CSI}${-x}D`;
+ else if (x > 0) ret += `${CSI}${x}C`;
+
+ if (y < 0) ret += `${CSI}${-y}A`;
+ else if (y > 0) ret += `${CSI}${y}B`;
+
+ return ret;
+ },
+ up: (count = 1) => `${CSI}${count}A`,
+ down: (count = 1) => `${CSI}${count}B`,
+ forward: (count = 1) => `${CSI}${count}C`,
+ backward: (count = 1) => `${CSI}${count}D`,
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
+ left: `${CSI}G`,
+ hide: `${CSI}?25l`,
+ show: `${CSI}?25h`,
+ save: `${ESC}7`,
+ restore: `${ESC}8`
+}
+
+const scroll = {
+ up: (count = 1) => `${CSI}S`.repeat(count),
+ down: (count = 1) => `${CSI}T`.repeat(count)
+}
+
+const erase = {
+ screen: `${CSI}2J`,
+ up: (count = 1) => `${CSI}1J`.repeat(count),
+ down: (count = 1) => `${CSI}J`.repeat(count),
+ line: `${CSI}2K`,
+ lineEnd: `${CSI}K`,
+ lineStart: `${CSI}1K`,
+ lines(count) {
+ let clear = '';
+ for (let i = 0; i < count; i++)
+ clear += this.line + (i < count - 1 ? cursor.up() : '');
+ if (count)
+ clear += cursor.left;
+ return clear;
+ }
+}
+
+module.exports = { cursor, scroll, erase, beep };
diff --git a/node_modules/sisteransi/src/sisteransi.d.ts b/node_modules/sisteransi/src/sisteransi.d.ts
new file mode 100644
index 0000000..113da2f
--- /dev/null
+++ b/node_modules/sisteransi/src/sisteransi.d.ts
@@ -0,0 +1,35 @@
+export const beep: string;
+export const clear: string;
+
+export namespace cursor {
+ export const left: string;
+ export const hide: string;
+ export const show: string;
+ export const save: string;
+ export const restore: string;
+
+ export function to(x: number, y?: number): string;
+ export function move(x: number, y: number): string;
+ export function up(count?: number): string;
+ export function down(count?: number): string;
+ export function forward(count?: number): string;
+ export function backward(count?: number): string;
+ export function nextLine(count?: number): string;
+ export function prevLine(count?: number): string;
+}
+
+export namespace scroll {
+ export function up(count?: number): string;
+ export function down(count?: number): string;
+}
+
+export namespace erase {
+ export const screen: string;
+ export const line: string;
+ export const lineEnd: string;
+ export const lineStart: string;
+
+ export function up(count?: number): string;
+ export function down(count?: number): string;
+ export function lines(count: number): string;
+}
diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000..778edb2
--- /dev/null
+++ b/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/string_decoder/README.md b/node_modules/string_decoder/README.md
new file mode 100644
index 0000000..5fd5831
--- /dev/null
+++ b/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/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000..2e89e63
--- /dev/null
+++ b/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/string_decoder/package.json b/node_modules/string_decoder/package.json
new file mode 100644
index 0000000..b2bb141
--- /dev/null
+++ b/node_modules/string_decoder/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "string_decoder",
+ "version": "1.3.0",
+ "description": "The string_decoder module from Node core",
+ "main": "lib/string_decoder.js",
+ "files": [
+ "lib"
+ ],
+ "dependencies": {
+ "safe-buffer": "~5.2.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/strip-ansi/index.d.ts b/node_modules/strip-ansi/index.d.ts
new file mode 100644
index 0000000..44e954d
--- /dev/null
+++ b/node_modules/strip-ansi/index.d.ts
@@ -0,0 +1,15 @@
+/**
+Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
+
+@example
+```
+import stripAnsi from 'strip-ansi';
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+*/
+export default function stripAnsi(string: string): string;
diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000..ef3c095
--- /dev/null
+++ b/node_modules/strip-ansi/index.js
@@ -0,0 +1,9 @@
+import ansiRegex from 'ansi-regex';
+
+export default function stripAnsi(string) {
+ if (typeof string !== 'string') {
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
+ }
+
+ return string.replace(ansiRegex(), '');
+}
diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/strip-ansi/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/strip-ansi/package.json b/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000..0de0586
--- /dev/null
+++ b/node_modules/strip-ansi/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "strip-ansi",
+ "version": "7.0.1",
+ "description": "Strip ANSI escape codes from a string",
+ "license": "MIT",
+ "repository": "chalk/strip-ansi",
+ "funding": "https://github.com/chalk/strip-ansi?sponsor=1",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "type": "module",
+ "exports": "./index.js",
+ "engines": {
+ "node": ">=12"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "devDependencies": {
+ "ava": "^3.15.0",
+ "tsd": "^0.17.0",
+ "xo": "^0.44.0"
+ }
+}
diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md
new file mode 100644
index 0000000..5627851
--- /dev/null
+++ b/node_modules/strip-ansi/readme.md
@@ -0,0 +1,41 @@
+# strip-ansi
+
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
+
+## Install
+
+```
+$ npm install strip-ansi
+```
+
+## Usage
+
+```js
+import stripAnsi from 'strip-ansi';
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+
+## strip-ansi for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js
new file mode 100644
index 0000000..62afa3a
--- /dev/null
+++ b/node_modules/supports-color/browser.js
@@ -0,0 +1,5 @@
+'use strict';
+module.exports = {
+ stdout: false,
+ stderr: false
+};
diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js
new file mode 100644
index 0000000..6fada39
--- /dev/null
+++ b/node_modules/supports-color/index.js
@@ -0,0 +1,135 @@
+'use strict';
+const os = require('os');
+const tty = require('tty');
+const hasFlag = require('has-flag');
+
+const {env} = process;
+
+let forceColor;
+if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false') ||
+ hasFlag('color=never')) {
+ forceColor = 0;
+} else if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ forceColor = 1;
+}
+
+if ('FORCE_COLOR' in env) {
+ if (env.FORCE_COLOR === 'true') {
+ forceColor = 1;
+ } else if (env.FORCE_COLOR === 'false') {
+ forceColor = 0;
+ } else {
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
+ }
+}
+
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+}
+
+function supportsColor(haveStream, streamIsTTY) {
+ if (forceColor === 0) {
+ return 0;
+ }
+
+ if (hasFlag('color=16m') ||
+ hasFlag('color=full') ||
+ hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
+ return 0;
+ }
+
+ const min = forceColor || 0;
+
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ if (process.platform === 'win32') {
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
+ const osRelease = os.release().split('.');
+ if (
+ Number(osRelease[0]) >= 10 &&
+ Number(osRelease[2]) >= 10586
+ ) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return min;
+ }
+
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
+
+ if ('TERM_PROGRAM' in env) {
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ return min;
+}
+
+function getSupportLevel(stream) {
+ const level = supportsColor(stream, stream && stream.isTTY);
+ return translateLevel(level);
+}
+
+module.exports = {
+ supportsColor: getSupportLevel,
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
+};
diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/supports-color/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/supports-color/package.json b/node_modules/supports-color/package.json
new file mode 100644
index 0000000..f7182ed
--- /dev/null
+++ b/node_modules/supports-color/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "supports-color",
+ "version": "7.2.0",
+ "description": "Detect whether a terminal supports color",
+ "license": "MIT",
+ "repository": "chalk/supports-color",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js",
+ "browser.js"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect",
+ "truecolor",
+ "16m"
+ ],
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "import-fresh": "^3.0.0",
+ "xo": "^0.24.0"
+ },
+ "browser": "browser.js"
+}
diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md
new file mode 100644
index 0000000..3654228
--- /dev/null
+++ b/node_modules/supports-color/readme.md
@@ -0,0 +1,76 @@
+# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```
+$ npm install supports-color
+```
+
+
+## Usage
+
+```js
+const supportsColor = require('supports-color');
+
+if (supportsColor.stdout) {
+ console.log('Terminal stdout supports color');
+}
+
+if (supportsColor.stdout.has256) {
+ console.log('Terminal stdout supports 256 colors');
+}
+
+if (supportsColor.stderr.has16m) {
+ console.log('Terminal stderr supports 16 million colors (truecolor)');
+}
+```
+
+
+## API
+
+Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
+
+The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
+
+- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
+- `.level = 2` and `.has256 = true`: 256 color support
+- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
+
+
+## Info
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Related
+
+- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-supports-color?utm_source=npm-supports-color&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/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/wcwidth/.npmignore b/node_modules/wcwidth/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/wcwidth/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/wcwidth/LICENSE b/node_modules/wcwidth/LICENSE
new file mode 100644
index 0000000..313ef1e
--- /dev/null
+++ b/node_modules/wcwidth/LICENSE
@@ -0,0 +1,30 @@
+wcwidth.js: JavaScript Portng of Markus Kuhn's wcwidth() Implementation
+=======================================================================
+
+Copyright (C) 2012 by Jun Woong.
+
+This package is a JavaScript porting of `wcwidth()` implementation
+[by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+
+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
+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/wcwidth/Readme.md b/node_modules/wcwidth/Readme.md
new file mode 100644
index 0000000..0649a31
--- /dev/null
+++ b/node_modules/wcwidth/Readme.md
@@ -0,0 +1,33 @@
+# wcwidth
+
+Determine columns needed for a fixed-size wide-character string
+
+----
+
+wcwidth is a simple JavaScript port of [wcwidth](http://man7.org/linux/man-pages/man3/wcswidth.3.html) implemented in C by Markus Kuhn.
+
+JavaScript port [originally](https://github.com/mycoboco/wcwidth.js) written by Woong Jun <woong.jun@gmail.com> (http://code.woong.org/)
+
+## Example
+
+```js
+'한'.length // => 1
+wcwidth('한'); // => 2
+
+'한글'.length // => 2
+wcwidth('한글'); // => 4
+```
+
+`wcwidth()` and its string version, `wcswidth()` are defined by IEEE Std
+1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used
+to represent the given wide character and string.
+
+Markus's implementation assumes the wide character given to those
+functions to be encoded in ISO 10646, which is almost true for
+JavaScript's characters.
+
+[Further explaination here](docs)
+
+## License
+
+MIT
diff --git a/node_modules/wcwidth/combining.js b/node_modules/wcwidth/combining.js
new file mode 100644
index 0000000..dac9789
--- /dev/null
+++ b/node_modules/wcwidth/combining.js
@@ -0,0 +1,50 @@
+module.exports = [
+ [ 0x0300, 0x036F ], [ 0x0483, 0x0486 ], [ 0x0488, 0x0489 ],
+ [ 0x0591, 0x05BD ], [ 0x05BF, 0x05BF ], [ 0x05C1, 0x05C2 ],
+ [ 0x05C4, 0x05C5 ], [ 0x05C7, 0x05C7 ], [ 0x0600, 0x0603 ],
+ [ 0x0610, 0x0615 ], [ 0x064B, 0x065E ], [ 0x0670, 0x0670 ],
+ [ 0x06D6, 0x06E4 ], [ 0x06E7, 0x06E8 ], [ 0x06EA, 0x06ED ],
+ [ 0x070F, 0x070F ], [ 0x0711, 0x0711 ], [ 0x0730, 0x074A ],
+ [ 0x07A6, 0x07B0 ], [ 0x07EB, 0x07F3 ], [ 0x0901, 0x0902 ],
+ [ 0x093C, 0x093C ], [ 0x0941, 0x0948 ], [ 0x094D, 0x094D ],
+ [ 0x0951, 0x0954 ], [ 0x0962, 0x0963 ], [ 0x0981, 0x0981 ],
+ [ 0x09BC, 0x09BC ], [ 0x09C1, 0x09C4 ], [ 0x09CD, 0x09CD ],
+ [ 0x09E2, 0x09E3 ], [ 0x0A01, 0x0A02 ], [ 0x0A3C, 0x0A3C ],
+ [ 0x0A41, 0x0A42 ], [ 0x0A47, 0x0A48 ], [ 0x0A4B, 0x0A4D ],
+ [ 0x0A70, 0x0A71 ], [ 0x0A81, 0x0A82 ], [ 0x0ABC, 0x0ABC ],
+ [ 0x0AC1, 0x0AC5 ], [ 0x0AC7, 0x0AC8 ], [ 0x0ACD, 0x0ACD ],
+ [ 0x0AE2, 0x0AE3 ], [ 0x0B01, 0x0B01 ], [ 0x0B3C, 0x0B3C ],
+ [ 0x0B3F, 0x0B3F ], [ 0x0B41, 0x0B43 ], [ 0x0B4D, 0x0B4D ],
+ [ 0x0B56, 0x0B56 ], [ 0x0B82, 0x0B82 ], [ 0x0BC0, 0x0BC0 ],
+ [ 0x0BCD, 0x0BCD ], [ 0x0C3E, 0x0C40 ], [ 0x0C46, 0x0C48 ],
+ [ 0x0C4A, 0x0C4D ], [ 0x0C55, 0x0C56 ], [ 0x0CBC, 0x0CBC ],
+ [ 0x0CBF, 0x0CBF ], [ 0x0CC6, 0x0CC6 ], [ 0x0CCC, 0x0CCD ],
+ [ 0x0CE2, 0x0CE3 ], [ 0x0D41, 0x0D43 ], [ 0x0D4D, 0x0D4D ],
+ [ 0x0DCA, 0x0DCA ], [ 0x0DD2, 0x0DD4 ], [ 0x0DD6, 0x0DD6 ],
+ [ 0x0E31, 0x0E31 ], [ 0x0E34, 0x0E3A ], [ 0x0E47, 0x0E4E ],
+ [ 0x0EB1, 0x0EB1 ], [ 0x0EB4, 0x0EB9 ], [ 0x0EBB, 0x0EBC ],
+ [ 0x0EC8, 0x0ECD ], [ 0x0F18, 0x0F19 ], [ 0x0F35, 0x0F35 ],
+ [ 0x0F37, 0x0F37 ], [ 0x0F39, 0x0F39 ], [ 0x0F71, 0x0F7E ],
+ [ 0x0F80, 0x0F84 ], [ 0x0F86, 0x0F87 ], [ 0x0F90, 0x0F97 ],
+ [ 0x0F99, 0x0FBC ], [ 0x0FC6, 0x0FC6 ], [ 0x102D, 0x1030 ],
+ [ 0x1032, 0x1032 ], [ 0x1036, 0x1037 ], [ 0x1039, 0x1039 ],
+ [ 0x1058, 0x1059 ], [ 0x1160, 0x11FF ], [ 0x135F, 0x135F ],
+ [ 0x1712, 0x1714 ], [ 0x1732, 0x1734 ], [ 0x1752, 0x1753 ],
+ [ 0x1772, 0x1773 ], [ 0x17B4, 0x17B5 ], [ 0x17B7, 0x17BD ],
+ [ 0x17C6, 0x17C6 ], [ 0x17C9, 0x17D3 ], [ 0x17DD, 0x17DD ],
+ [ 0x180B, 0x180D ], [ 0x18A9, 0x18A9 ], [ 0x1920, 0x1922 ],
+ [ 0x1927, 0x1928 ], [ 0x1932, 0x1932 ], [ 0x1939, 0x193B ],
+ [ 0x1A17, 0x1A18 ], [ 0x1B00, 0x1B03 ], [ 0x1B34, 0x1B34 ],
+ [ 0x1B36, 0x1B3A ], [ 0x1B3C, 0x1B3C ], [ 0x1B42, 0x1B42 ],
+ [ 0x1B6B, 0x1B73 ], [ 0x1DC0, 0x1DCA ], [ 0x1DFE, 0x1DFF ],
+ [ 0x200B, 0x200F ], [ 0x202A, 0x202E ], [ 0x2060, 0x2063 ],
+ [ 0x206A, 0x206F ], [ 0x20D0, 0x20EF ], [ 0x302A, 0x302F ],
+ [ 0x3099, 0x309A ], [ 0xA806, 0xA806 ], [ 0xA80B, 0xA80B ],
+ [ 0xA825, 0xA826 ], [ 0xFB1E, 0xFB1E ], [ 0xFE00, 0xFE0F ],
+ [ 0xFE20, 0xFE23 ], [ 0xFEFF, 0xFEFF ], [ 0xFFF9, 0xFFFB ],
+ [ 0x10A01, 0x10A03 ], [ 0x10A05, 0x10A06 ], [ 0x10A0C, 0x10A0F ],
+ [ 0x10A38, 0x10A3A ], [ 0x10A3F, 0x10A3F ], [ 0x1D167, 0x1D169 ],
+ [ 0x1D173, 0x1D182 ], [ 0x1D185, 0x1D18B ], [ 0x1D1AA, 0x1D1AD ],
+ [ 0x1D242, 0x1D244 ], [ 0xE0001, 0xE0001 ], [ 0xE0020, 0xE007F ],
+ [ 0xE0100, 0xE01EF ]
+]
diff --git a/node_modules/wcwidth/docs/index.md b/node_modules/wcwidth/docs/index.md
new file mode 100644
index 0000000..5c5126d
--- /dev/null
+++ b/node_modules/wcwidth/docs/index.md
@@ -0,0 +1,65 @@
+### Javascript porting of Markus Kuhn's wcwidth() implementation
+
+The following explanation comes from the original C implementation:
+
+This is an implementation of wcwidth() and wcswidth() (defined in
+IEEE Std 1002.1-2001) for Unicode.
+
+http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
+http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
+
+In fixed-width output devices, Latin characters all occupy a single
+"cell" position of equal width, whereas ideographic CJK characters
+occupy two such cells. Interoperability between terminal-line
+applications and (teletype-style) character terminals using the
+UTF-8 encoding requires agreement on which character should advance
+the cursor by how many cell positions. No established formal
+standards exist at present on which Unicode character shall occupy
+how many cell positions on character terminals. These routines are
+a first attempt of defining such behavior based on simple rules
+applied to data provided by the Unicode Consortium.
+
+For some graphical characters, the Unicode standard explicitly
+defines a character-cell width via the definition of the East Asian
+FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
+In all these cases, there is no ambiguity about which width a
+terminal shall use. For characters in the East Asian Ambiguous (A)
+class, the width choice depends purely on a preference of backward
+compatibility with either historic CJK or Western practice.
+Choosing single-width for these characters is easy to justify as
+the appropriate long-term solution, as the CJK practice of
+displaying these characters as double-width comes from historic
+implementation simplicity (8-bit encoded characters were displayed
+single-width and 16-bit ones double-width, even for Greek,
+Cyrillic, etc.) and not any typographic considerations.
+
+Much less clear is the choice of width for the Not East Asian
+(Neutral) class. Existing practice does not dictate a width for any
+of these characters. It would nevertheless make sense
+typographically to allocate two character cells to characters such
+as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
+represented adequately with a single-width glyph. The following
+routines at present merely assign a single-cell width to all
+neutral characters, in the interest of simplicity. This is not
+entirely satisfactory and should be reconsidered before
+establishing a formal standard in this area. At the moment, the
+decision which Not East Asian (Neutral) characters should be
+represented by double-width glyphs cannot yet be answered by
+applying a simple rule from the Unicode database content. Setting
+up a proper standard for the behavior of UTF-8 character terminals
+will require a careful analysis not only of each Unicode character,
+but also of each presentation form, something the author of these
+routines has avoided to do so far.
+
+http://www.unicode.org/unicode/reports/tr11/
+
+Markus Kuhn -- 2007-05-26 (Unicode 5.0)
+
+Permission to use, copy, modify, and distribute this software
+for any purpose and without fee is hereby granted. The author
+disclaims all warranties with regard to this software.
+
+Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+
+
+
diff --git a/node_modules/wcwidth/index.js b/node_modules/wcwidth/index.js
new file mode 100644
index 0000000..48cbb60
--- /dev/null
+++ b/node_modules/wcwidth/index.js
@@ -0,0 +1,99 @@
+"use strict"
+
+var defaults = require('defaults')
+var combining = require('./combining')
+
+var DEFAULTS = {
+ nul: 0,
+ control: 0
+}
+
+module.exports = function wcwidth(str) {
+ return wcswidth(str, DEFAULTS)
+}
+
+module.exports.config = function(opts) {
+ opts = defaults(opts || {}, DEFAULTS)
+ return function wcwidth(str) {
+ return wcswidth(str, opts)
+ }
+}
+
+/*
+ * The following functions define the column width of an ISO 10646
+ * character as follows:
+ * - The null character (U+0000) has a column width of 0.
+ * - Other C0/C1 control characters and DEL will lead to a return value
+ * of -1.
+ * - Non-spacing and enclosing combining characters (general category
+ * code Mn or Me in the
+ * Unicode database) have a column width of 0.
+ * - SOFT HYPHEN (U+00AD) has a column width of 1.
+ * - Other format characters (general category code Cf in the Unicode
+ * database) and ZERO WIDTH
+ * SPACE (U+200B) have a column width of 0.
+ * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
+ * have a column width of 0.
+ * - Spacing characters in the East Asian Wide (W) or East Asian
+ * Full-width (F) category as
+ * defined in Unicode Technical Report #11 have a column width of 2.
+ * - All remaining characters (including all printable ISO 8859-1 and
+ * WGL4 characters, Unicode control characters, etc.) have a column
+ * width of 1.
+ * This implementation assumes that characters are encoded in ISO 10646.
+*/
+
+function wcswidth(str, opts) {
+ if (typeof str !== 'string') return wcwidth(str, opts)
+
+ var s = 0
+ for (var i = 0; i < str.length; i++) {
+ var n = wcwidth(str.charCodeAt(i), opts)
+ if (n < 0) return -1
+ s += n
+ }
+
+ return s
+}
+
+function wcwidth(ucs, opts) {
+ // test for 8-bit control characters
+ if (ucs === 0) return opts.nul
+ if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) return opts.control
+
+ // binary search in table of non-spacing characters
+ if (bisearch(ucs)) return 0
+
+ // if we arrive here, ucs is not a combining or C0/C1 control character
+ return 1 +
+ (ucs >= 0x1100 &&
+ (ucs <= 0x115f || // Hangul Jamo init. consonants
+ ucs == 0x2329 || ucs == 0x232a ||
+ (ucs >= 0x2e80 && ucs <= 0xa4cf &&
+ ucs != 0x303f) || // CJK ... Yi
+ (ucs >= 0xac00 && ucs <= 0xd7a3) || // Hangul Syllables
+ (ucs >= 0xf900 && ucs <= 0xfaff) || // CJK Compatibility Ideographs
+ (ucs >= 0xfe10 && ucs <= 0xfe19) || // Vertical forms
+ (ucs >= 0xfe30 && ucs <= 0xfe6f) || // CJK Compatibility Forms
+ (ucs >= 0xff00 && ucs <= 0xff60) || // Fullwidth Forms
+ (ucs >= 0xffe0 && ucs <= 0xffe6) ||
+ (ucs >= 0x20000 && ucs <= 0x2fffd) ||
+ (ucs >= 0x30000 && ucs <= 0x3fffd)));
+}
+
+function bisearch(ucs) {
+ var min = 0
+ var max = combining.length - 1
+ var mid
+
+ if (ucs < combining[0][0] || ucs > combining[max][1]) return false
+
+ while (max >= min) {
+ mid = Math.floor((min + max) / 2)
+ if (ucs > combining[mid][1]) min = mid + 1
+ else if (ucs < combining[mid][0]) max = mid - 1
+ else return true
+ }
+
+ return false
+}
diff --git a/node_modules/wcwidth/package.json b/node_modules/wcwidth/package.json
new file mode 100644
index 0000000..eb2df9d
--- /dev/null
+++ b/node_modules/wcwidth/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "wcwidth",
+ "version": "1.0.1",
+ "description": "Port of C's wcwidth() and wcswidth()",
+ "author": "Tim Oxley",
+ "contributors": [
+ "Woong Jun <woong.jun@gmail.com> (http://code.woong.org/)"
+ ],
+ "main": "index.js",
+ "dependencies": {
+ "defaults": "^1.0.3"
+ },
+ "devDependencies": {
+ "tape": "^4.5.1"
+ },
+ "license": "MIT",
+ "keywords": [
+ "wide character",
+ "wc",
+ "wide character string",
+ "wcs",
+ "terminal",
+ "width",
+ "wcwidth",
+ "wcswidth"
+ ],
+ "directories": {
+ "doc": "docs",
+ "test": "test"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/timoxley/wcwidth.git"
+ },
+ "bugs": {
+ "url": "https://github.com/timoxley/wcwidth/issues"
+ },
+ "homepage": "https://github.com/timoxley/wcwidth#readme"
+}
diff --git a/node_modules/wcwidth/test/index.js b/node_modules/wcwidth/test/index.js
new file mode 100644
index 0000000..5180599
--- /dev/null
+++ b/node_modules/wcwidth/test/index.js
@@ -0,0 +1,64 @@
+"use strict"
+
+var wcwidth = require('../')
+var test = require('tape')
+
+test('handles regular strings', function(t) {
+ t.strictEqual(wcwidth('abc'), 3)
+ t.end()
+})
+
+test('handles multibyte strings', function(t) {
+ t.strictEqual(wcwidth('字的模块'), 8)
+ t.end()
+})
+
+test('handles multibyte characters mixed with regular characters', function(t) {
+ t.strictEqual(wcwidth('abc 字的模块'), 12)
+ t.end()
+})
+
+test('ignores control characters e.g. \\n', function(t) {
+ t.strictEqual(wcwidth('abc\n字的模块\ndef'), 14)
+ t.end()
+})
+
+test('ignores bad input', function(t) {
+ t.strictEqual(wcwidth(''), 0)
+ t.strictEqual(wcwidth(3), 0)
+ t.strictEqual(wcwidth({}), 0)
+ t.strictEqual(wcwidth([]), 0)
+ t.strictEqual(wcwidth(), 0)
+ t.end()
+})
+
+test('ignores nul (charcode 0)', function(t) {
+ t.strictEqual(wcwidth(String.fromCharCode(0)), 0)
+ t.end()
+})
+
+test('ignores nul mixed with chars', function(t) {
+ t.strictEqual(wcwidth('a' + String.fromCharCode(0) + '\n字的'), 5)
+ t.end()
+})
+
+test('can have custom value for nul', function(t) {
+ t.strictEqual(wcwidth.config({
+ nul: 10
+ })(String.fromCharCode(0) + 'a字的'), 15)
+ t.end()
+})
+
+test('can have custom control char value', function(t) {
+ t.strictEqual(wcwidth.config({
+ control: 1
+ })('abc\n字的模块\ndef'), 16)
+ t.end()
+})
+
+test('negative custom control chars == -1', function(t) {
+ t.strictEqual(wcwidth.config({
+ control: -1
+ })('abc\n字的模块\ndef'), -1)
+ t.end()
+})
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..d72b581
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,677 @@
+{
+ "name": "autopush",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "autopush",
+ "version": "1.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^4.1.2",
+ "ora": "^6.1.2",
+ "prompts": "^2.4.2"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "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/bl": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
+ "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/cli-cursor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
+ "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
+ "dependencies": {
+ "restore-cursor": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-spinners": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
+ "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/defaults": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "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/is-interactive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
+ "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/log-symbols": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
+ "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
+ "dependencies": {
+ "chalk": "^5.0.0",
+ "is-unicode-supported": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-symbols/node_modules/chalk": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+ "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ora": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-6.1.2.tgz",
+ "integrity": "sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw==",
+ "dependencies": {
+ "bl": "^5.0.0",
+ "chalk": "^5.0.0",
+ "cli-cursor": "^4.0.0",
+ "cli-spinners": "^2.6.1",
+ "is-interactive": "^2.0.0",
+ "is-unicode-supported": "^1.1.0",
+ "log-symbols": "^5.1.0",
+ "strip-ansi": "^7.0.1",
+ "wcwidth": "^1.0.1"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ora/node_modules/chalk": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+ "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/prompts": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
+ "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
+ "dependencies": {
+ "kleur": "^3.0.3",
+ "sisteransi": "^1.0.5"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/restore-cursor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
+ "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
+ "dependencies": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "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/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
+ },
+ "node_modules/sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
+ "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
+ },
+ "node_modules/wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "dependencies": {
+ "defaults": "^1.0.3"
+ }
+ }
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA=="
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ },
+ "bl": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
+ "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
+ "requires": {
+ "buffer": "^6.0.3",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "cli-cursor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
+ "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
+ "requires": {
+ "restore-cursor": "^4.0.0"
+ }
+ },
+ "cli-spinners": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
+ "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw=="
+ },
+ "clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "defaults": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+ "requires": {
+ "clone": "^1.0.2"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ },
+ "ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "is-interactive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
+ "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="
+ },
+ "is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="
+ },
+ "kleur": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="
+ },
+ "log-symbols": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
+ "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
+ "requires": {
+ "chalk": "^5.0.0",
+ "is-unicode-supported": "^1.1.0"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+ "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA=="
+ }
+ }
+ },
+ "mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
+ },
+ "onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "requires": {
+ "mimic-fn": "^2.1.0"
+ }
+ },
+ "ora": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-6.1.2.tgz",
+ "integrity": "sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw==",
+ "requires": {
+ "bl": "^5.0.0",
+ "chalk": "^5.0.0",
+ "cli-cursor": "^4.0.0",
+ "cli-spinners": "^2.6.1",
+ "is-interactive": "^2.0.0",
+ "is-unicode-supported": "^1.1.0",
+ "log-symbols": "^5.1.0",
+ "strip-ansi": "^7.0.1",
+ "wcwidth": "^1.0.1"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+ "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA=="
+ }
+ }
+ },
+ "prompts": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
+ "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
+ "requires": {
+ "kleur": "^3.0.3",
+ "sisteransi": "^1.0.5"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "restore-cursor": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
+ "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
+ "requires": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ }
+ },
+ "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=="
+ },
+ "signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
+ },
+ "sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="
+ },
+ "string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "requires": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
+ "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
+ "requires": {
+ "ansi-regex": "^6.0.1"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
+ },
+ "wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "requires": {
+ "defaults": "^1.0.3"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..e76f243
--- /dev/null
+++ b/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "autopush",
+ "version": "1.0.0",
+ "description": "",
+ "main": "autopush",
+ "scripts": {
+ "run": "./autopush",
+ "test": "cd /Volumes/Unicorn; /Volumes/Unicorn/autopush/autopush"
+ },
+ "author": "Equestria.dev",
+ "type": "commonjs",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^4.1.2",
+ "ora": "^6.1.2",
+ "prompts": "^2.4.2"
+ }
+}